#include <ultra64.h>
#include "internal.h"
#include "mp3.h"

#define CHANNELMODE_STEREO      0
#define CHANNELMODE_JOINTSTEREO 1
#define CHANNELMODE_DUALMONO    2
#define CHANNELMODE_SINGLEMONO  3

#define VERSION_2 0x0
#define VERSION_1 0x1

struct mp3decthing {
	u8 unk00;
	u8 unk01;
	u8 unk02;
	u8 unk03;
	u32 unk04;
};

extern const struct mp3decthing var70054b40[];

f32 sine_block[4][36];
struct mp3decfourbytes *var8009c640;
f32 *var8009c644;
f32 *var8009c648;

const struct mp3decthing var70054b40[] = {
	{ 0,   0,   1,   0, 1 },
	{ 0,   1,   3,   0, 4 },
	{ 1,   0,   2,   0, 2 },
	{ 1,   1,   3,   0, 0 },
	{ 100, 100, 100, 0, 0 },
};

const struct mp3decthing var70054b68[] = {
	{ 0,   0,   1,   0, 1  },
	{ 0,   1,   3,   0, 2  },
	{ 0,   2,   6,   0, 32 },
	{ 1,   0,   3,   0, 6  },
	{ 1,   1,   3,   0, 4  },
	{ 1,   2,   5,   0, 16 },
	{ 2,   0,   5,   0, 24 },
	{ 2,   1,   5,   0, 8  },
	{ 2,   2,   6,   0, 0  },
	{ 100, 100, 100, 0, 0  },
};

const struct mp3decthing var70054bb8[] = {
	{ 0,   0,   2,   0, 3  },
	{ 0,   1,   2,   0, 1  },
	{ 0,   2,   6,   0, 32 },
	{ 1,   0,   3,   0, 4  },
	{ 1,   1,   2,   0, 2  },
	{ 1,   2,   5,   0, 16 },
	{ 2,   0,   5,   0, 24 },
	{ 2,   1,   5,   0, 8  },
	{ 2,   2,   6,   0, 0  },
	{ 100, 100, 100, 0, 0  },
};

const struct mp3decthing var70054c08[] = {
	{ 0,   0,   1,   0, 1   },
	{ 0,   1,   3,   0, 2   },
	{ 0,   2,   6,   0, 24  },
	{ 0,   3,   7,   0, 80  },
	{ 1,   0,   3,   0, 6   },
	{ 1,   1,   3,   0, 4   },
	{ 1,   2,   6,   0, 8   },
	{ 1,   3,   7,   0, 16  },
	{ 2,   0,   6,   0, 56  },
	{ 2,   1,   6,   0, 40  },
	{ 2,   2,   7,   0, 112 },
	{ 2,   3,   8,   0, 128 },
	{ 3,   0,   7,   0, 48  },
	{ 3,   1,   6,   0, 32  },
	{ 3,   2,   7,   0, 64  },
	{ 3,   3,   8,   0, 0   },
	{ 100, 100, 100, 0, 0   },
};

const struct mp3decthing var70054c90[] = {
	{ 0,   0,   3,   0, 7  },
	{ 0,   1,   3,   0, 6  },
	{ 0,   2,   5,   0, 20 },
	{ 0,   3,   7,   0, 64 },
	{ 1,   0,   3,   0, 3  },
	{ 1,   1,   2,   0, 1  },
	{ 1,   2,   4,   0, 12 },
	{ 1,   3,   5,   0, 8  },
	{ 2,   0,   4,   0, 10 },
	{ 2,   1,   4,   0, 2  },
	{ 2,   2,   5,   0, 4  },
	{ 2,   3,   6,   0, 32 },
	{ 3,   0,   6,   0, 48 },
	{ 3,   1,   5,   0, 24 },
	{ 3,   2,   6,   0, 16 },
	{ 3,   3,   7,   0, 0  },
	{ 100, 100, 100, 0, 0  },
};

const struct mp3decthing var70054d18[] = {
	{ 0,   0,   1,   0, 1   },
	{ 0,   1,   3,   0, 2   },
	{ 0,   2,   6,   0, 20  },
	{ 0,   3,   8,   0, 200 },
	{ 0,   4,   8,   0, 8   },
	{ 0,   5,   9,   0, 160 },
	{ 1,   0,   3,   0, 6   },
	{ 1,   1,   4,   0, 12  },
	{ 1,   2,   6,   0, 56  },
	{ 1,   3,   7,   0, 40  },
	{ 1,   4,   7,   0, 80  },
	{ 1,   5,   8,   0, 192 },
	{ 2,   0,   6,   0, 52  },
	{ 2,   1,   5,   0, 4   },
	{ 2,   2,   7,   0, 88  },
	{ 2,   3,   8,   0, 136 },
	{ 2,   4,   8,   0, 16  },
	{ 2,   5,   9,   0, 64  },
	{ 3,   0,   7,   0, 24  },
	{ 3,   1,   7,   0, 104 },
	{ 3,   2,   8,   0, 72  },
	{ 3,   3,   9,   0, 480 },
	{ 3,   4,   9,   0, 416 },
	{ 3,   5,   9,   0, 128 },
	{ 4,   0,   7,   0, 112 },
	{ 4,   1,   7,   0, 48  },
	{ 4,   2,   8,   0, 144 },
	{ 4,   3,   9,   0, 224 },
	{ 4,   4,   9,   0, 384 },
	{ 4,   5,   10,  0, 512 },
	{ 5,   0,   8,   0, 96  },
	{ 5,   1,   8,   0, 32  },
	{ 5,   2,   9,   0, 320 },
	{ 5,   3,   10,  0, 768 },
	{ 5,   4,   10,  0, 256 },
	{ 5,   5,   10,  0, 0   },
	{ 100, 100, 100, 0, 0   },
};

const struct mp3decthing var70054e40[] = {
	{ 0,   0,   2,   0, 3    },
	{ 0,   1,   3,   0, 1    },
	{ 0,   2,   6,   0, 24   },
	{ 0,   3,   8,   0, 72   },
	{ 0,   4,   8,   0, 48   },
	{ 0,   5,   9,   0, 320  },
	{ 1,   0,   3,   0, 5    },
	{ 1,   1,   2,   0, 2    },
	{ 1,   2,   4,   0, 4    },
	{ 1,   3,   8,   0, 8    },
	{ 1,   4,   8,   0, 144  },
	{ 1,   5,   8,   0, 192  },
	{ 2,   0,   6,   0, 56   },
	{ 2,   1,   4,   0, 12   },
	{ 2,   2,   6,   0, 40   },
	{ 2,   3,   8,   0, 112  },
	{ 2,   4,   8,   0, 224  },
	{ 2,   5,   9,   0, 384  },
	{ 3,   0,   8,   0, 200  },
	{ 3,   1,   8,   0, 136  },
	{ 3,   2,   8,   0, 240  },
	{ 3,   3,   9,   0, 352  },
	{ 3,   4,   9,   0, 160  },
	{ 3,   5,   10,  0, 128  },
	{ 4,   0,   8,   0, 176  },
	{ 4,   1,   7,   0, 80   },
	{ 4,   2,   8,   0, 16   },
	{ 4,   3,   9,   0, 416  },
	{ 4,   4,   10,  0, 640  },
	{ 4,   5,   10,  0, 512  },
	{ 5,   0,   9,   0, 96   },
	{ 5,   1,   8,   0, 32   },
	{ 5,   2,   9,   0, 64   },
	{ 5,   3,   9,   0, 256  },
	{ 5,   4,   11,  0, 1024 },
	{ 5,   5,   11,  0, 0    },
	{ 100, 100, 100, 0, 0    },
};

const struct mp3decthing var70054f68[] = {
	{ 0,   0,   3,   0, 7   },
	{ 0,   1,   3,   0, 5   },
	{ 0,   2,   5,   0, 18  },
	{ 0,   3,   6,   0, 28  },
	{ 0,   4,   8,   0, 240 },
	{ 0,   5,   9,   0, 448 },
	{ 1,   0,   3,   0, 3   },
	{ 1,   1,   3,   0, 1   },
	{ 1,   2,   4,   0, 10  },
	{ 1,   3,   5,   0, 20  },
	{ 1,   4,   6,   0, 24  },
	{ 1,   5,   8,   0, 224 },
	{ 2,   0,   4,   0, 14  },
	{ 2,   1,   4,   0, 6   },
	{ 2,   2,   5,   0, 2   },
	{ 2,   3,   6,   0, 4   },
	{ 2,   4,   7,   0, 8   },
	{ 2,   5,   8,   0, 160 },
	{ 3,   0,   6,   0, 60  },
	{ 3,   1,   5,   0, 12  },
	{ 3,   2,   6,   0, 36  },
	{ 3,   3,   7,   0, 40  },
	{ 3,   4,   7,   0, 80  },
	{ 3,   5,   8,   0, 128 },
	{ 4,   0,   7,   0, 104 },
	{ 4,   1,   6,   0, 56  },
	{ 4,   2,   7,   0, 72  },
	{ 4,   3,   7,   0, 48  },
	{ 4,   4,   8,   0, 32  },
	{ 4,   5,   9,   0, 256 },
	{ 5,   0,   8,   0, 112 },
	{ 5,   1,   7,   0, 16  },
	{ 5,   2,   8,   0, 96  },
	{ 5,   3,   8,   0, 64  },
	{ 5,   4,   9,   0, 192 },
	{ 5,   5,   9,   0, 0   },
	{ 100, 100, 100, 0, 0   },
};

const struct mp3decthing var70055090[] = {
	{ 0,   0,   1,   0, 1    },
	{ 0,   1,   3,   0, 2    },
	{ 0,   2,   6,   0, 20   },
	{ 0,   3,   8,   0, 232  },
	{ 0,   4,   9,   0, 392  },
	{ 0,   5,   9,   0, 240  },
	{ 0,   6,   9,   0, 96   },
	{ 0,   7,   10,  0, 544  },
	{ 1,   0,   3,   0, 6    },
	{ 1,   1,   4,   0, 12   },
	{ 1,   2,   6,   0, 4    },
	{ 1,   3,   7,   0, 24   },
	{ 1,   4,   8,   0, 72   },
	{ 1,   5,   9,   0, 336  },
	{ 1,   6,   8,   0, 48   },
	{ 1,   7,   8,   0, 224  },
	{ 2,   0,   6,   0, 52   },
	{ 2,   1,   6,   0, 36   },
	{ 2,   2,   7,   0, 120  },
	{ 2,   3,   8,   0, 168  },
	{ 2,   4,   9,   0, 8    },
	{ 2,   5,   10,  0, 80   },
	{ 2,   6,   9,   0, 400  },
	{ 2,   7,   9,   0, 192  },
	{ 3,   0,   7,   0, 56   },
	{ 3,   1,   7,   0, 88   },
	{ 3,   2,   8,   0, 104  },
	{ 3,   3,   9,   0, 136  },
	{ 3,   4,   10,  0, 464  },
	{ 3,   5,   10,  0, 928  },
	{ 3,   6,   9,   0, 144  },
	{ 3,   7,   10,  0, 896  },
	{ 4,   0,   8,   0, 40   },
	{ 4,   1,   8,   0, 200  },
	{ 4,   2,   9,   0, 264  },
	{ 4,   3,   10,  0, 976  },
	{ 4,   4,   10,  0, 864  },
	{ 4,   5,   10,  0, 416  },
	{ 4,   6,   10,  0, 576  },
	{ 4,   7,   10,  0, 768  },
	{ 5,   0,   9,   0, 496  },
	{ 5,   1,   9,   0, 208  },
	{ 5,   2,   10,  0, 592  },
	{ 5,   3,   10,  0, 352  },
	{ 5,   4,   11,  0, 1344 },
	{ 5,   5,   11,  0, 320  },
	{ 5,   6,   10,  0, 640  },
	{ 5,   7,   11,  0, 1536 },
	{ 6,   0,   8,   0, 112  },
	{ 6,   1,   8,   0, 176  },
	{ 6,   2,   9,   0, 160  },
	{ 6,   3,   10,  0, 832  },
	{ 6,   4,   10,  0, 32   },
	{ 6,   5,   10,  0, 384  },
	{ 6,   6,   11,  0, 1280 },
	{ 6,   7,   11,  0, 1024 },
	{ 7,   0,   9,   0, 288  },
	{ 7,   1,   8,   0, 16   },
	{ 7,   2,   9,   0, 448  },
	{ 7,   3,   10,  0, 64   },
	{ 7,   4,   10,  0, 128  },
	{ 7,   5,   11,  0, 256  },
	{ 7,   6,   11,  0, 512  },
	{ 7,   7,   11,  0, 0    },
	{ 100, 100, 100, 0, 0    },
};

const struct mp3decthing var70055298[] = {
	{ 0,   0,   2,   0, 3    },
	{ 0,   1,   3,   0, 1    },
	{ 0,   2,   5,   0, 10   },
	{ 0,   3,   7,   0, 12   },
	{ 0,   4,   8,   0, 68   },
	{ 0,   5,   9,   0, 264  },
	{ 0,   6,   8,   0, 168  },
	{ 0,   7,   9,   0, 480  },
	{ 1,   0,   3,   0, 5    },
	{ 1,   1,   3,   0, 6    },
	{ 1,   2,   4,   0, 2    },
	{ 1,   3,   6,   0, 20   },
	{ 1,   4,   8,   0, 4    },
	{ 1,   5,   8,   0, 136  },
	{ 1,   6,   7,   0, 104  },
	{ 1,   7,   8,   0, 80   },
	{ 2,   0,   5,   0, 26   },
	{ 2,   1,   5,   0, 28   },
	{ 2,   2,   6,   0, 44   },
	{ 2,   3,   7,   0, 36   },
	{ 2,   4,   8,   0, 120  },
	{ 2,   5,   9,   0, 496  },
	{ 2,   6,   8,   0, 40   },
	{ 2,   7,   8,   0, 160  },
	{ 3,   0,   7,   0, 76   },
	{ 3,   1,   6,   0, 52   },
	{ 3,   2,   7,   0, 100  },
	{ 3,   3,   9,   0, 440  },
	{ 3,   4,   8,   0, 216  },
	{ 3,   5,   10,  0, 288  },
	{ 3,   6,   8,   0, 48   },
	{ 3,   7,   9,   0, 320  },
	{ 4,   0,   8,   0, 196  },
	{ 4,   1,   8,   0, 132  },
	{ 4,   2,   8,   0, 248  },
	{ 4,   3,   9,   0, 184  },
	{ 4,   4,   9,   0, 240  },
	{ 4,   5,   10,  0, 32   },
	{ 4,   6,   9,   0, 448  },
	{ 4,   7,   10,  0, 640  },
	{ 5,   0,   8,   0, 56   },
	{ 5,   1,   8,   0, 88   },
	{ 5,   2,   9,   0, 8    },
	{ 5,   3,   10,  0, 800  },
	{ 5,   4,   10,  0, 544  },
	{ 5,   5,   11,  0, 1920 },
	{ 5,   6,   10,  0, 64   },
	{ 5,   7,   11,  0, 896  },
	{ 6,   0,   8,   0, 112  },
	{ 6,   1,   7,   0, 24   },
	{ 6,   2,   7,   0, 72   },
	{ 6,   3,   8,   0, 176  },
	{ 6,   4,   9,   0, 224  },
	{ 6,   5,   10,  0, 576  },
	{ 6,   6,   10,  0, 128  },
	{ 6,   7,   10,  0, 512  },
	{ 7,   0,   8,   0, 208  },
	{ 7,   1,   7,   0, 16   },
	{ 7,   2,   8,   0, 96   },
	{ 7,   3,   9,   0, 192  },
	{ 7,   4,   10,  0, 384  },
	{ 7,   5,   10,  0, 768  },
	{ 7,   6,   10,  0, 256  },
	{ 7,   7,   10,  0, 0    },
	{ 100, 100, 100, 0, 0    },
};

const struct mp3decthing var700554a0[] = {
	{ 0,   0,   4,   0, 9   },
	{ 0,   1,   3,   0, 3   },
	{ 0,   2,   5,   0, 1   },
	{ 0,   3,   7,   0, 66  },
	{ 0,   4,   8,   0, 148 },
	{ 0,   5,   9,   0, 456 },
	{ 0,   6,   9,   0, 200 },
	{ 0,   7,   9,   0, 176 },
	{ 1,   0,   3,   0, 7   },
	{ 1,   1,   3,   0, 5   },
	{ 1,   2,   4,   0, 6   },
	{ 1,   3,   5,   0, 18  },
	{ 1,   4,   7,   0, 116 },
	{ 1,   5,   7,   0, 4   },
	{ 1,   6,   8,   0, 88  },
	{ 1,   7,   8,   0, 208 },
	{ 2,   0,   5,   0, 17  },
	{ 2,   1,   4,   0, 14  },
	{ 2,   2,   5,   0, 26  },
	{ 2,   3,   6,   0, 28  },
	{ 2,   4,   7,   0, 84  },
	{ 2,   5,   8,   0, 120 },
	{ 2,   6,   7,   0, 40  },
	{ 2,   7,   8,   0, 224 },
	{ 3,   0,   6,   0, 34  },
	{ 3,   1,   5,   0, 10  },
	{ 3,   2,   6,   0, 60  },
	{ 3,   3,   6,   0, 12  },
	{ 3,   4,   7,   0, 36  },
	{ 3,   5,   8,   0, 56  },
	{ 3,   6,   8,   0, 112 },
	{ 3,   7,   8,   0, 160 },
	{ 4,   0,   7,   0, 2   },
	{ 4,   1,   6,   0, 44  },
	{ 4,   2,   7,   0, 52  },
	{ 4,   3,   7,   0, 100 },
	{ 4,   4,   8,   0, 72  },
	{ 4,   5,   8,   0, 8   },
	{ 4,   6,   8,   0, 144 },
	{ 4,   7,   9,   0, 320 },
	{ 5,   0,   8,   0, 20  },
	{ 5,   1,   7,   0, 68  },
	{ 5,   2,   8,   0, 248 },
	{ 5,   3,   8,   0, 184 },
	{ 5,   4,   8,   0, 136 },
	{ 5,   5,   9,   0, 352 },
	{ 5,   6,   8,   0, 32  },
	{ 5,   7,   9,   0, 128 },
	{ 6,   0,   8,   0, 216 },
	{ 6,   1,   7,   0, 24  },
	{ 6,   2,   7,   0, 104 },
	{ 6,   3,   8,   0, 240 },
	{ 6,   4,   8,   0, 80  },
	{ 6,   5,   9,   0, 448 },
	{ 6,   6,   9,   0, 64  },
	{ 6,   7,   10,  0, 512 },
	{ 7,   0,   9,   0, 432 },
	{ 7,   1,   8,   0, 48  },
	{ 7,   2,   8,   0, 16  },
	{ 7,   3,   9,   0, 96  },
	{ 7,   4,   9,   0, 192 },
	{ 7,   5,   9,   0, 384 },
	{ 7,   6,   9,   0, 256 },
	{ 7,   7,   10,  0, 0   },
	{ 100, 100, 100, 0, 0   },
};

const struct mp3decthing var700556a8[] = {
	{ 0,   0,   1,   0, 1      },
	{ 0,   1,   4,   0, 10     },
	{ 0,   2,   6,   0, 28     },
	{ 0,   3,   7,   0, 84     },
	{ 0,   4,   8,   0, 68     },
	{ 0,   5,   9,   0, 408    },
	{ 0,   6,   9,   0, 232    },
	{ 0,   7,   10,  0, 904    },
	{ 0,   8,   9,   0, 168    },
	{ 0,   9,   10,  0, 176    },
	{ 0,   10,  11,  0, 272    },
	{ 0,   11,  11,  0, 352    },
	{ 0,   12,  12,  0, 3104   },
	{ 0,   13,  12,  0, 832    },
	{ 0,   14,  13,  0, 6784   },
	{ 0,   15,  13,  0, 6400   },
	{ 1,   0,   3,   0, 6      },
	{ 1,   1,   4,   0, 2      },
	{ 1,   2,   6,   0, 12     },
	{ 1,   3,   7,   0, 100    },
	{ 1,   4,   8,   0, 248    },
	{ 1,   5,   8,   0, 88     },
	{ 1,   6,   9,   0, 104    },
	{ 1,   7,   9,   0, 264    },
	{ 1,   8,   9,   0, 496    },
	{ 1,   9,   9,   0, 48     },
	{ 1,   10,  10,  0, 16     },
	{ 1,   11,  10,  0, 96     },
	{ 1,   12,  11,  0, 1984   },
	{ 1,   13,  12,  0, 3136   },
	{ 1,   14,  12,  0, 1664   },
	{ 1,   15,  12,  0, 1792   },
	{ 2,   0,   6,   0, 60     },
	{ 2,   1,   6,   0, 44     },
	{ 2,   2,   7,   0, 116    },
	{ 2,   3,   8,   0, 36     },
	{ 2,   4,   9,   0, 440    },
	{ 2,   5,   9,   0, 280    },
	{ 2,   6,   10,  0, 712    },
	{ 2,   7,   10,  0, 520    },
	{ 2,   8,   9,   0, 368    },
	{ 2,   9,   10,  0, 80     },
	{ 2,   10,  10,  0, 480    },
	{ 2,   11,  11,  0, 160    },
	{ 2,   12,  11,  0, 1728   },
	{ 2,   13,  12,  0, 2112   },
	{ 2,   14,  13,  0, 2688   },
	{ 2,   15,  13,  0, 256    },
	{ 3,   0,   7,   0, 52     },
	{ 3,   1,   7,   0, 20     },
	{ 3,   2,   8,   0, 164    },
	{ 3,   3,   9,   0, 376    },
	{ 3,   4,   9,   0, 56     },
	{ 3,   5,   10,  0, 968    },
	{ 3,   6,   10,  0, 584    },
	{ 3,   7,   10,  0, 8      },
	{ 3,   8,   10,  0, 848    },
	{ 3,   9,   11,  0, 400    },
	{ 3,   10,  11,  0, 224    },
	{ 3,   11,  11,  0, 1312   },
	{ 3,   12,  11,  0, 704    },
	{ 3,   13,  12,  0, 3968   },
	{ 3,   14,  13,  0, 4864   },
	{ 3,   15,  13,  0, 3584   },
	{ 4,   0,   8,   0, 196    },
	{ 4,   1,   7,   0, 4      },
	{ 4,   2,   9,   0, 120    },
	{ 4,   3,   9,   0, 312    },
	{ 4,   4,   10,  0, 536    },
	{ 4,   5,   10,  0, 840    },
	{ 4,   6,   11,  0, 624    },
	{ 4,   7,   11,  0, 1744   },
	{ 4,   8,   10,  0, 432    },
	{ 4,   9,   11,  0, 1168   },
	{ 4,   10,  11,  0, 1888   },
	{ 4,   11,  12,  0, 2368   },
	{ 4,   12,  12,  0, 192    },
	{ 4,   13,  13,  0, 5504   },
	{ 4,   14,  13,  0, 7424   },
	{ 4,   15,  14,  0, 1536   },
	{ 5,   0,   9,   0, 184    },
	{ 5,   1,   8,   0, 216    },
	{ 5,   2,   9,   0, 152    },
	{ 5,   3,   10,  0, 24     },
	{ 5,   4,   10,  0, 200    },
	{ 5,   5,   10,  0, 392    },
	{ 5,   6,   11,  0, 1488   },
	{ 5,   7,   11,  0, 336    },
	{ 5,   8,   11,  0, 1424   },
	{ 5,   9,   11,  0, 736    },
	{ 5,   10,  12,  0, 3872   },
	{ 5,   11,  11,  0, 1472   },
	{ 5,   12,  13,  0, 2624   },
	{ 5,   13,  13,  0, 4480   },
	{ 5,   14,  14,  0, 9472   },
	{ 5,   15,  14,  0, 8704   },
	{ 6,   0,   9,   0, 488    },
	{ 6,   1,   9,   0, 360    },
	{ 6,   2,   10,  0, 456    },
	{ 6,   3,   10,  0, 328    },
	{ 6,   4,   11,  0, 1648   },
	{ 6,   5,   11,  0, 976    },
	{ 6,   6,   11,  0, 720    },
	{ 6,   7,   11,  0, 1936   },
	{ 6,   8,   11,  0, 1296   },
	{ 6,   9,   12,  0, 3232   },
	{ 6,   10,  12,  0, 3616   },
	{ 6,   11,  12,  0, 1216   },
	{ 6,   12,  13,  0, 7040   },
	{ 6,   13,  13,  0, 3200   },
	{ 6,   14,  14,  0, 2304   },
	{ 6,   15,  14,  0, 15360  },
	{ 7,   0,   10,  0, 72     },
	{ 7,   1,   9,   0, 136    },
	{ 7,   2,   10,  0, 112    },
	{ 7,   3,   11,  0, 2000   },
	{ 7,   4,   11,  0, 464    },
	{ 7,   5,   11,  0, 1360   },
	{ 7,   6,   12,  0, 3488   },
	{ 7,   7,   12,  0, 1440   },
	{ 7,   8,   12,  0, 1696   },
	{ 7,   9,   12,  0, 2336   },
	{ 7,   10,  13,  0, 5696   },
	{ 7,   11,  13,  0, 4160   },
	{ 7,   12,  13,  0, 6528   },
	{ 7,   13,  14,  0, 3328   },
	{ 7,   14,  16,  0, 54272  },
	{ 7,   15,  16,  0, 21504  },
	{ 8,   0,   9,   0, 424    },
	{ 8,   1,   8,   0, 40     },
	{ 8,   2,   9,   0, 240    },
	{ 8,   3,   10,  0, 208    },
	{ 8,   4,   10,  0, 944    },
	{ 8,   5,   11,  0, 912    },
	{ 8,   6,   11,  0, 144    },
	{ 8,   7,   12,  0, 3744   },
	{ 8,   8,   12,  0, 1824   },
	{ 8,   9,   12,  0, 3008   },
	{ 8,   10,  12,  0, 1856   },
	{ 8,   11,  13,  0, 3456   },
	{ 8,   12,  13,  0, 5248   },
	{ 8,   13,  14,  0, 7680   },
	{ 8,   14,  15,  0, 5120   },
	{ 8,   15,  15,  0, 1024   },
	{ 9,   0,   10,  0, 688    },
	{ 9,   1,   9,   0, 304    },
	{ 9,   2,   10,  0, 592    },
	{ 9,   3,   10,  0, 656    },
	{ 9,   4,   11,  0, 416    },
	{ 9,   5,   11,  0, 1760   },
	{ 9,   6,   11,  0, 864    },
	{ 9,   7,   13,  0, 4416   },
	{ 9,   8,   12,  0, 1056   },
	{ 9,   9,   13,  0, 1600   },
	{ 9,   10,  13,  0, 4992   },
	{ 9,   11,  14,  0, 6912   },
	{ 9,   12,  14,  0, 10496  },
	{ 9,   13,  14,  0, 4608   },
	{ 9,   14,  16,  0, 58368  },
	{ 9,   15,  15,  0, 26624  },
	{ 10,  0,   10,  0, 784    },
	{ 10,  1,   10,  0, 528    },
	{ 10,  2,   10,  0, 992    },
	{ 10,  3,   11,  0, 1248   },
	{ 10,  4,   11,  0, 672    },
	{ 10,  5,   12,  0, 1184   },
	{ 10,  6,   12,  0, 288    },
	{ 10,  7,   13,  0, 320    },
	{ 10,  8,   12,  0, 3904   },
	{ 10,  9,   13,  0, 2944   },
	{ 10,  10,  14,  0, 15104  },
	{ 10,  11,  13,  0, 5376   },
	{ 10,  12,  14,  0, 6656   },
	{ 10,  13,  15,  0, 11264  },
	{ 10,  14,  16,  0, 25600  },
	{ 10,  15,  17,  0, 53248  },
	{ 11,  0,   11,  0, 1376   },
	{ 11,  1,   10,  0, 608    },
	{ 11,  2,   10,  0, 928    },
	{ 11,  3,   11,  0, 800    },
	{ 11,  4,   12,  0, 1568   },
	{ 11,  5,   12,  0, 960    },
	{ 11,  6,   12,  0, 3264   },
	{ 11,  7,   12,  0, 576    },
	{ 11,  8,   13,  0, 7552   },
	{ 11,  9,   13,  0, 2816   },
	{ 11,  10,  13,  0, 2176   },
	{ 11,  11,  14,  0, 14848  },
	{ 11,  12,  15,  0, 27648  },
	{ 11,  13,  15,  0, 14336  },
	{ 11,  14,  15,  0, 18432  },
	{ 11,  15,  16,  0, 57344  },
	{ 12,  0,   11,  0, 544    },
	{ 12,  1,   11,  0, 32     },
	{ 12,  2,   11,  0, 448    },
	{ 12,  3,   12,  0, 3648   },
	{ 12,  4,   12,  0, 2240   },
	{ 12,  5,   13,  0, 6720   },
	{ 12,  6,   12,  0, 1920   },
	{ 12,  7,   13,  0, 1408   },
	{ 12,  8,   14,  0, 768    },
	{ 12,  9,   14,  0, 1280   },
	{ 12,  10,  15,  0, 5632   },
	{ 12,  11,  15,  0, 7168   },
	{ 12,  12,  15,  0, 9216   },
	{ 12,  13,  16,  0, 34816  },
	{ 12,  14,  16,  0, 36864  },
	{ 12,  15,  16,  0, 40960  },
	{ 13,  0,   12,  0, 2880   },
	{ 13,  1,   11,  0, 1344   },
	{ 13,  2,   12,  0, 1088   },
	{ 13,  3,   13,  0, 64     },
	{ 13,  4,   13,  0, 896    },
	{ 13,  5,   13,  0, 2432   },
	{ 13,  6,   14,  0, 8960   },
	{ 13,  7,   14,  0, 11520  },
	{ 13,  8,   14,  0, 15872  },
	{ 13,  9,   14,  0, 12800  },
	{ 13,  10,  14,  0, 3072   },
	{ 13,  11,  15,  0, 30720  },
	{ 13,  12,  16,  0, 20480  },
	{ 13,  13,  15,  0, 28672  },
	{ 13,  14,  16,  0, 24576  },
	{ 13,  15,  16,  0, 49152  },
	{ 14,  0,   13,  0, 384    },
	{ 14,  1,   12,  0, 3712   },
	{ 14,  2,   12,  0, 640    },
	{ 14,  3,   13,  0, 7296   },
	{ 14,  4,   13,  0, 1152   },
	{ 14,  5,   13,  0, 6272   },
	{ 14,  6,   15,  0, 22016  },
	{ 14,  7,   14,  0, 10752  },
	{ 14,  8,   14,  0, 512    },
	{ 14,  9,   17,  0, 118784 },
	{ 14,  10,  15,  0, 22528  },
	{ 14,  11,  15,  0, 10240  },
	{ 14,  12,  15,  0, 12288  },
	{ 14,  13,  17,  0, 65536  },
	{ 14,  14,  16,  0, 8192   },
	{ 14,  15,  16,  0, 16384  },
	{ 15,  0,   12,  0, 128    },
	{ 15,  1,   12,  0, 3840   },
	{ 15,  2,   13,  0, 4352   },
	{ 15,  3,   14,  0, 13824  },
	{ 15,  4,   14,  0, 9728   },
	{ 15,  5,   14,  0, 2560   },
	{ 15,  6,   15,  0, 23552  },
	{ 15,  7,   14,  0, 13312  },
	{ 15,  8,   15,  0, 17408  },
	{ 15,  9,   15,  0, 6144   },
	{ 15,  10,  16,  0, 2048   },
	{ 15,  11,  16,  0, 4096   },
	{ 15,  12,  19,  0, 262144 },
	{ 15,  13,  18,  0, 131072 },
	{ 15,  14,  19,  0, 0      },
	{ 15,  15,  16,  0, 32768  },
	{ 100, 100, 100, 0, 0      },
};

const struct mp3decthing var70055eb0[] = {
	{ 0,   0,   3,   0, 7    },
	{ 0,   1,   4,   0, 3    },
	{ 0,   2,   5,   0, 9    },
	{ 0,   3,   7,   0, 86   },
	{ 0,   4,   7,   0, 122  },
	{ 0,   5,   8,   0, 50   },
	{ 0,   6,   9,   0, 124  },
	{ 0,   7,   9,   0, 108  },
	{ 0,   8,   9,   0, 308  },
	{ 0,   9,   10,  0, 888  },
	{ 0,   10,  10,  0, 216  },
	{ 0,   11,  11,  0, 1904 },
	{ 0,   12,  11,  0, 1712 },
	{ 0,   13,  11,  0, 1104 },
	{ 0,   14,  12,  0, 1504 },
	{ 0,   15,  13,  0, 8064 },
	{ 1,   0,   4,   0, 11   },
	{ 1,   1,   3,   0, 5    },
	{ 1,   2,   5,   0, 1    },
	{ 1,   3,   6,   0, 54   },
	{ 1,   4,   7,   0, 58   },
	{ 1,   5,   7,   0, 18   },
	{ 1,   6,   8,   0, 188  },
	{ 1,   7,   8,   0, 204  },
	{ 1,   8,   8,   0, 84   },
	{ 1,   9,   9,   0, 196  },
	{ 1,   10,  9,   0, 88   },
	{ 1,   11,  10,  0, 808  },
	{ 1,   12,  10,  0, 520  },
	{ 1,   13,  10,  0, 592  },
	{ 1,   14,  11,  0, 1760 },
	{ 1,   15,  11,  0, 288  },
	{ 2,   0,   5,   0, 25   },
	{ 2,   1,   5,   0, 17   },
	{ 2,   2,   5,   0, 30   },
	{ 2,   3,   6,   0, 6    },
	{ 2,   4,   7,   0, 74   },
	{ 2,   5,   7,   0, 34   },
	{ 2,   6,   8,   0, 220  },
	{ 2,   7,   8,   0, 12   },
	{ 2,   8,   8,   0, 20   },
	{ 2,   9,   9,   0, 4    },
	{ 2,   10,  9,   0, 152  },
	{ 2,   11,  10,  0, 456  },
	{ 2,   12,  10,  0, 496  },
	{ 2,   13,  11,  0, 80   },
	{ 2,   14,  11,  0, 224  },
	{ 2,   15,  11,  0, 1056 },
	{ 3,   0,   6,   0, 46   },
	{ 3,   1,   6,   0, 14   },
	{ 3,   2,   6,   0, 38   },
	{ 3,   3,   7,   0, 106  },
	{ 3,   4,   7,   0, 114  },
	{ 3,   5,   8,   0, 252  },
	{ 3,   6,   8,   0, 236  },
	{ 3,   7,   9,   0, 372  },
	{ 3,   8,   9,   0, 100  },
	{ 3,   9,   9,   0, 440  },
	{ 3,   10,  10,  0, 744  },
	{ 3,   11,  10,  0, 72   },
	{ 3,   12,  10,  0, 432  },
	{ 3,   13,  11,  0, 1680 },
	{ 3,   14,  11,  0, 608  },
	{ 3,   15,  11,  0, 1472 },
	{ 4,   0,   7,   0, 22   },
	{ 4,   1,   6,   0, 26   },
	{ 4,   2,   7,   0, 42   },
	{ 4,   3,   7,   0, 10   },
	{ 4,   4,   8,   0, 194  },
	{ 4,   5,   8,   0, 156  },
	{ 4,   6,   9,   0, 500  },
	{ 4,   7,   9,   0, 484  },
	{ 4,   8,   9,   0, 36   },
	{ 4,   9,   9,   0, 312  },
	{ 4,   10,  10,  0, 616  },
	{ 4,   11,  10,  0, 648  },
	{ 4,   12,  10,  0, 560  },
	{ 4,   13,  11,  0, 528  },
	{ 4,   14,  11,  0, 928  },
	{ 4,   15,  11,  0, 1728 },
	{ 5,   0,   8,   0, 178  },
	{ 5,   1,   7,   0, 82   },
	{ 5,   2,   7,   0, 98   },
	{ 5,   3,   8,   0, 66   },
	{ 5,   4,   8,   0, 92   },
	{ 5,   5,   8,   0, 44   },
	{ 5,   6,   9,   0, 436  },
	{ 5,   7,   9,   0, 164  },
	{ 5,   8,   9,   0, 248  },
	{ 5,   9,   9,   0, 24   },
	{ 5,   10,  10,  0, 968  },
	{ 5,   11,  10,  0, 1008 },
	{ 5,   12,  11,  0, 720  },
	{ 5,   13,  11,  0, 992  },
	{ 5,   14,  11,  0, 160  },
	{ 5,   15,  12,  0, 1600 },
	{ 6,   0,   9,   0, 380  },
	{ 6,   1,   7,   0, 2    },
	{ 6,   2,   8,   0, 60   },
	{ 6,   3,   8,   0, 28   },
	{ 6,   4,   8,   0, 76   },
	{ 6,   5,   9,   0, 116  },
	{ 6,   6,   9,   0, 228  },
	{ 6,   7,   9,   0, 260  },
	{ 6,   8,   9,   0, 472  },
	{ 6,   9,   10,  0, 936  },
	{ 6,   10,  10,  0, 904  },
	{ 6,   11,  10,  0, 816  },
	{ 6,   12,  11,  0, 1168 },
	{ 6,   13,  11,  0, 1632 },
	{ 6,   14,  12,  0, 1568 },
	{ 6,   15,  12,  0, 1920 },
	{ 7,   0,   9,   0, 364  },
	{ 7,   1,   8,   0, 172  },
	{ 7,   2,   8,   0, 140  },
	{ 7,   3,   9,   0, 244  },
	{ 7,   4,   9,   0, 52   },
	{ 7,   5,   9,   0, 420  },
	{ 7,   6,   9,   0, 132  },
	{ 7,   7,   10,  0, 376  },
	{ 7,   8,   10,  0, 872  },
	{ 7,   9,   10,  0, 584  },
	{ 7,   10,  10,  0, 112  },
	{ 7,   11,  10,  0, 336  },
	{ 7,   12,  11,  0, 16   },
	{ 7,   13,  11,  0, 416  },
	{ 7,   14,  11,  0, 1344 },
	{ 7,   15,  12,  0, 2432 },
	{ 8,   0,   9,   0, 180  },
	{ 8,   1,   8,   0, 212  },
	{ 8,   2,   8,   0, 148  },
	{ 8,   3,   9,   0, 356  },
	{ 8,   4,   9,   0, 292  },
	{ 8,   5,   9,   0, 504  },
	{ 8,   6,   9,   0, 56   },
	{ 8,   7,   10,  0, 232  },
	{ 8,   8,   10,  0, 712  },
	{ 8,   9,   10,  0, 264  },
	{ 8,   10,  10,  0, 976  },
	{ 8,   11,  11,  0, 1552 },
	{ 8,   12,  11,  0, 96   },
	{ 8,   13,  12,  0, 2752 },
	{ 8,   14,  12,  0, 576  },
	{ 8,   15,  12,  0, 640  },
	{ 9,   0,   9,   0, 452  },
	{ 9,   1,   8,   0, 68   },
	{ 9,   2,   9,   0, 388  },
	{ 9,   3,   9,   0, 120  },
	{ 9,   4,   9,   0, 184  },
	{ 9,   5,   9,   0, 280  },
	{ 9,   6,   10,  0, 104  },
	{ 9,   7,   10,  0, 200  },
	{ 9,   8,   10,  0, 776  },
	{ 9,   9,   11,  0, 688  },
	{ 9,   10,  11,  0, 1808 },
	{ 9,   11,  11,  0, 864  },
	{ 9,   12,  11,  0, 800  },
	{ 9,   13,  12,  0, 3648 },
	{ 9,   14,  12,  0, 3712 },
	{ 9,   15,  12,  0, 3840 },
	{ 10,  0,   10,  0, 728  },
	{ 10,  1,   9,   0, 344  },
	{ 10,  2,   9,   0, 408  },
	{ 10,  3,   9,   0, 488  },
	{ 10,  4,   10,  0, 360  },
	{ 10,  5,   10,  0, 296  },
	{ 10,  6,   10,  0, 368  },
	{ 10,  7,   10,  0, 624  },
	{ 10,  8,   10,  0, 48   },
	{ 10,  9,   11,  0, 144  },
	{ 10,  10,  11,  0, 1248 },
	{ 10,  11,  11,  0, 1184 },
	{ 10,  12,  11,  0, 1856 },
	{ 10,  13,  12,  0, 3456 },
	{ 10,  14,  13,  0, 3968 },
	{ 10,  15,  12,  0, 2304 },
	{ 11,  0,   10,  0, 424  },
	{ 11,  1,   9,   0, 168  },
	{ 11,  2,   9,   0, 40   },
	{ 11,  3,   9,   0, 328  },
	{ 11,  4,   10,  0, 392  },
	{ 11,  5,   10,  0, 8    },
	{ 11,  6,   10,  0, 176  },
	{ 11,  7,   10,  0, 848  },
	{ 11,  8,   11,  0, 784  },
	{ 11,  9,   11,  0, 1888 },
	{ 11,  10,  11,  0, 672  },
	{ 11,  11,  11,  0, 1216 },
	{ 11,  12,  12,  0, 2944 },
	{ 11,  13,  12,  0, 1152 },
	{ 11,  14,  12,  0, 3328 },
	{ 11,  15,  13,  0, 6656 },
	{ 12,  0,   11,  0, 880  },
	{ 12,  1,   10,  0, 136  },
	{ 12,  2,   9,   0, 240  },
	{ 12,  3,   10,  0, 944  },
	{ 12,  4,   10,  0, 304  },
	{ 12,  5,   10,  0, 464  },
	{ 12,  6,   11,  0, 656  },
	{ 12,  7,   11,  0, 1040 },
	{ 12,  8,   11,  0, 1120 },
	{ 12,  9,   11,  0, 1824 },
	{ 12,  10,  11,  0, 192  },
	{ 12,  11,  11,  0, 64   },
	{ 12,  12,  12,  0, 1664 },
	{ 12,  13,  12,  0, 2816 },
	{ 12,  14,  13,  0, 3584 },
	{ 12,  15,  13,  0, 7168 },
	{ 13,  0,   11,  0, 1744 },
	{ 13,  1,   10,  0, 208  },
	{ 13,  2,   10,  0, 912  },
	{ 13,  3,   10,  0, 400  },
	{ 13,  4,   10,  0, 272  },
	{ 13,  5,   11,  0, 2016 },
	{ 13,  6,   11,  0, 352  },
	{ 13,  7,   11,  0, 1440 },
	{ 13,  8,   11,  0, 1984 },
	{ 13,  9,   12,  0, 704  },
	{ 13,  10,  12,  0, 896  },
	{ 13,  11,  12,  0, 3200 },
	{ 13,  12,  12,  0, 1792 },
	{ 13,  13,  12,  0, 256  },
	{ 13,  14,  13,  0, 4608 },
	{ 13,  15,  13,  0, 6144 },
	{ 14,  0,   12,  0, 3552 },
	{ 14,  1,   11,  0, 480  },
	{ 14,  2,   11,  0, 736  },
	{ 14,  3,   11,  0, 1376 },
	{ 14,  4,   11,  0, 1952 },
	{ 14,  5,   11,  0, 1696 },
	{ 14,  6,   11,  0, 32   },
	{ 14,  7,   11,  0, 832  },
	{ 14,  8,   12,  0, 2624 },
	{ 14,  9,   12,  0, 384  },
	{ 14,  10,  12,  0, 2176 },
	{ 14,  11,  12,  0, 768  },
	{ 14,  12,  13,  0, 7680 },
	{ 14,  13,  13,  0, 2560 },
	{ 14,  14,  12,  0, 1024 },
	{ 14,  15,  13,  0, 4096 },
	{ 15,  0,   12,  0, 3616 },
	{ 15,  1,   11,  0, 1312 },
	{ 15,  2,   11,  0, 544  },
	{ 15,  3,   11,  0, 960  },
	{ 15,  4,   11,  0, 448  },
	{ 15,  5,   11,  0, 320  },
	{ 15,  6,   11,  0, 1088 },
	{ 15,  7,   12,  0, 1408 },
	{ 15,  8,   12,  0, 2688 },
	{ 15,  9,   12,  0, 128  },
	{ 15,  10,  12,  0, 1280 },
	{ 15,  11,  12,  0, 1536 },
	{ 15,  12,  13,  0, 512  },
	{ 15,  13,  13,  0, 3072 },
	{ 15,  14,  13,  0, 2048 },
	{ 15,  15,  13,  0, 0    },
	{ 100, 100, 100, 0, 0    },
};

const struct mp3decthing var700566b8[] = {
	{ 0,   0,   1,   0, 1     },
	{ 0,   1,   4,   0, 10    },
	{ 0,   2,   6,   0, 28    },
	{ 0,   3,   8,   0, 52    },
	{ 0,   4,   9,   0, 164   },
	{ 0,   5,   9,   0, 504   },
	{ 0,   6,   10,  0, 472   },
	{ 0,   7,   10,  0, 744   },
	{ 0,   8,   11,  0, 424   },
	{ 0,   9,   11,  0, 1352  },
	{ 0,   10,  11,  0, 648   },
	{ 0,   11,  12,  0, 1264  },
	{ 0,   12,  12,  0, 2160  },
	{ 0,   13,  12,  0, 3120  },
	{ 0,   14,  13,  0, 976   },
	{ 0,   15,  9,   0, 272   },
	{ 1,   0,   3,   0, 6     },
	{ 1,   1,   4,   0, 2     },
	{ 1,   2,   6,   0, 12    },
	{ 1,   3,   7,   0, 20    },
	{ 1,   4,   8,   0, 196   },
	{ 1,   5,   9,   0, 248   },
	{ 1,   6,   9,   0, 344   },
	{ 1,   7,   9,   0, 488   },
	{ 1,   8,   10,  0, 808   },
	{ 1,   9,   10,  0, 840   },
	{ 1,   10,  10,  0, 136   },
	{ 1,   11,  11,  0, 1904  },
	{ 1,   12,  12,  0, 2352  },
	{ 1,   13,  11,  0, 1712  },
	{ 1,   14,  12,  0, 3888  },
	{ 1,   15,  8,   0, 144   },
	{ 2,   0,   6,   0, 60    },
	{ 2,   1,   6,   0, 44    },
	{ 2,   2,   7,   0, 116   },
	{ 2,   3,   8,   0, 100   },
	{ 2,   4,   9,   0, 388   },
	{ 2,   5,   9,   0, 184   },
	{ 2,   6,   10,  0, 920   },
	{ 2,   7,   10,  0, 360   },
	{ 2,   8,   11,  0, 1064  },
	{ 2,   9,   10,  0, 72    },
	{ 2,   10,  11,  0, 2032  },
	{ 2,   11,  11,  0, 1392  },
	{ 2,   12,  11,  0, 944   },
	{ 2,   13,  12,  0, 2224  },
	{ 2,   14,  12,  0, 1840  },
	{ 2,   15,  9,   0, 16    },
	{ 3,   0,   8,   0, 180   },
	{ 3,   1,   7,   0, 84    },
	{ 3,   2,   8,   0, 228   },
	{ 3,   3,   9,   0, 324   },
	{ 3,   4,   9,   0, 4     },
	{ 3,   5,   10,  0, 312   },
	{ 3,   6,   10,  0, 792   },
	{ 3,   7,   10,  0, 936   },
	{ 3,   8,   11,  0, 968   },
	{ 3,   9,   11,  0, 392   },
	{ 3,   10,  12,  0, 1008  },
	{ 3,   11,  12,  0, 688   },
	{ 3,   12,  12,  0, 3632  },
	{ 3,   13,  13,  0, 6192  },
	{ 3,   14,  13,  0, 5840  },
	{ 3,   15,  10,  0, 352   },
	{ 4,   0,   9,   0, 420   },
	{ 4,   1,   8,   0, 36    },
	{ 4,   2,   9,   0, 68    },
	{ 4,   3,   9,   0, 260   },
	{ 4,   4,   10,  0, 824   },
	{ 4,   5,   10,  0, 664   },
	{ 4,   6,   11,  0, 1640  },
	{ 4,   7,   11,  0, 296   },
	{ 4,   8,   11,  0, 1736  },
	{ 4,   9,   12,  0, 264   },
	{ 4,   10,  12,  0, 1776  },
	{ 4,   11,  12,  0, 1136  },
	{ 4,   12,  13,  0, 6704  },
	{ 4,   13,  13,  0, 4048  },
	{ 4,   14,  13,  0, 2768  },
	{ 4,   15,  9,   0, 288   },
	{ 5,   0,   9,   0, 132   },
	{ 5,   1,   8,   0, 120   },
	{ 5,   2,   9,   0, 440   },
	{ 5,   3,   9,   0, 56    },
	{ 5,   4,   10,  0, 408   },
	{ 5,   5,   11,  0, 1256  },
	{ 5,   6,   11,  0, 1448  },
	{ 5,   7,   12,  0, 2312  },
	{ 5,   8,   11,  0, 904   },
	{ 5,   9,   12,  0, 3056  },
	{ 5,   10,  12,  0, 368   },
	{ 5,   11,  13,  0, 304   },
	{ 5,   12,  13,  0, 1072  },
	{ 5,   13,  13,  0, 3024  },
	{ 5,   14,  14,  0, 12128 },
	{ 5,   15,  10,  0, 32    },
	{ 6,   0,   10,  0, 984   },
	{ 6,   1,   9,   0, 216   },
	{ 6,   2,   9,   0, 88    },
	{ 6,   3,   10,  0, 152   },
	{ 6,   4,   11,  0, 232   },
	{ 6,   5,   11,  0, 616   },
	{ 6,   6,   11,  0, 40    },
	{ 6,   7,   11,  0, 1288  },
	{ 6,   8,   12,  0, 2056  },
	{ 6,   9,   12,  0, 752   },
	{ 6,   10,  12,  0, 624   },
	{ 6,   11,  12,  0, 2480  },
	{ 6,   12,  13,  0, 4144  },
	{ 6,   13,  13,  0, 3792  },
	{ 6,   14,  14,  0, 13520 },
	{ 6,   15,  10,  0, 320   },
	{ 7,   0,   10,  0, 280   },
	{ 7,   1,   9,   0, 24    },
	{ 7,   2,   10,  0, 872   },
	{ 7,   3,   10,  0, 104   },
	{ 7,   4,   11,  0, 1320  },
	{ 7,   5,   11,  0, 1480  },
	{ 7,   6,   11,  0, 328   },
	{ 7,   7,   12,  0, 2568  },
	{ 7,   8,   12,  0, 496   },
	{ 7,   9,   13,  0, 7472  },
	{ 7,   10,  13,  0, 5680  },
	{ 7,   11,  13,  0, 1488  },
	{ 7,   12,  13,  0, 2000  },
	{ 7,   13,  15,  0, 20320 },
	{ 7,   14,  15,  0, 5984  },
	{ 7,   15,  10,  0, 64    },
	{ 8,   0,   10,  0, 680   },
	{ 8,   1,   10,  0, 168   },
	{ 8,   2,   10,  0, 552   },
	{ 8,   3,   11,  0, 1992  },
	{ 8,   4,   11,  0, 456   },
	{ 8,   5,   11,  0, 1928  },
	{ 8,   6,   12,  0, 520   },
	{ 8,   7,   12,  0, 2544  },
	{ 8,   8,   13,  0, 6832  },
	{ 8,   9,   13,  0, 4400  },
	{ 8,   10,  13,  0, 560   },
	{ 8,   11,  13,  0, 8144  },
	{ 8,   12,  14,  0, 15056 },
	{ 8,   13,  14,  0, 9424  },
	{ 8,   14,  14,  0, 2256  },
	{ 8,   15,  10,  0, 896   },
	{ 9,   0,   11,  0, 712   },
	{ 9,   1,   10,  0, 200   },
	{ 9,   2,   10,  0, 584   },
	{ 9,   3,   11,  0, 1416  },
	{ 9,   4,   11,  0, 1544  },
	{ 9,   5,   12,  0, 8     },
	{ 9,   6,   12,  0, 2800  },
	{ 9,   7,   13,  0, 2736  },
	{ 9,   8,   13,  0, 3376  },
	{ 9,   9,   13,  0, 2608  },
	{ 9,   10,  13,  0, 48    },
	{ 9,   11,  14,  0, 16080 },
	{ 9,   12,  13,  0, 7376  },
	{ 9,   13,  14,  0, 6352  },
	{ 9,   14,  13,  0, 208   },
	{ 9,   15,  11,  0, 1664  },
	{ 10,  0,   11,  0, 1672  },
	{ 10,  1,   11,  0, 1032  },
	{ 10,  2,   10,  0, 776   },
	{ 10,  3,   11,  0, 1520  },
	{ 10,  4,   12,  0, 3824  },
	{ 10,  5,   12,  0, 2416  },
	{ 10,  6,   12,  0, 2672  },
	{ 10,  7,   12,  0, 3504  },
	{ 10,  8,   13,  0, 4656  },
	{ 10,  9,   14,  0, 14800 },
	{ 10,  10,  14,  0, 8656  },
	{ 10,  11,  14,  0, 720   },
	{ 10,  12,  15,  0, 22368 },
	{ 10,  13,  15,  0, 10080 },
	{ 10,  14,  14,  0, 15200 },
	{ 10,  15,  10,  0, 128   },
	{ 11,  0,   12,  0, 3312  },
	{ 11,  1,   11,  0, 240   },
	{ 11,  2,   11,  0, 880   },
	{ 11,  3,   11,  0, 1648  },
	{ 11,  4,   12,  0, 3184  },
	{ 11,  5,   12,  0, 4016  },
	{ 11,  6,   13,  0, 1584  },
	{ 11,  7,   14,  0, 5584  },
	{ 11,  8,   14,  0, 6608  },
	{ 11,  9,   14,  0, 464   },
	{ 11,  10,  14,  0, 8912  },
	{ 11,  11,  14,  0, 1232  },
	{ 11,  12,  14,  0, 4304  },
	{ 11,  13,  13,  0, 8032  },
	{ 11,  14,  14,  0, 2912  },
	{ 11,  15,  11,  0, 768   },
	{ 12,  0,   12,  0, 1328  },
	{ 12,  1,   12,  0, 112   },
	{ 12,  2,   12,  0, 1968  },
	{ 12,  3,   12,  0, 1456  },
	{ 12,  4,   12,  0, 432   },
	{ 12,  5,   13,  0, 5168  },
	{ 12,  6,   13,  0, 2096  },
	{ 12,  7,   13,  0, 6096  },
	{ 12,  8,   13,  0, 1744  },
	{ 12,  9,   15,  0, 3936  },
	{ 12,  10,  14,  0, 14176 },
	{ 12,  11,  14,  0, 12496 },
	{ 12,  12,  14,  0, 1888  },
	{ 12,  13,  14,  0, 11104 },
	{ 12,  14,  16,  0, 864   },
	{ 12,  15,  11,  0, 256   },
	{ 13,  0,   14,  0, 13776 },
	{ 13,  1,   12,  0, 3248  },
	{ 13,  2,   12,  0, 1200  },
	{ 13,  3,   12,  0, 176   },
	{ 13,  4,   13,  0, 2512  },
	{ 13,  5,   13,  0, 7120  },
	{ 13,  6,   14,  0, 7888  },
	{ 13,  7,   14,  0, 13008 },
	{ 13,  8,   14,  0, 5328  },
	{ 13,  9,   16,  0, 58208 },
	{ 13,  10,  15,  0, 26464 },
	{ 13,  11,  15,  0, 23392 },
	{ 13,  12,  15,  0, 7008  },
	{ 13,  13,  17,  0, 99168 },
	{ 13,  14,  15,  0, 17248 },
	{ 13,  15,  11,  0, 512   },
	{ 14,  0,   13,  0, 5072  },
	{ 14,  1,   13,  0, 4560  },
	{ 14,  2,   11,  0, 816   },
	{ 14,  3,   12,  0, 3536  },
	{ 14,  4,   14,  0, 6864  },
	{ 14,  5,   14,  0, 4816  },
	{ 14,  6,   13,  0, 3280  },
	{ 14,  7,   14,  0, 14544 },
	{ 14,  8,   14,  0, 10448 },
	{ 14,  9,   15,  0, 9056  },
	{ 14,  10,  16,  0, 25440 },
	{ 14,  11,  15,  0, 29536 },
	{ 14,  12,  17,  0, 33632 },
	{ 14,  13,  15,  0, 13152 },
	{ 14,  14,  14,  0, 4960  },
	{ 14,  15,  11,  0, 0     },
	{ 15,  0,   9,   0, 96    },
	{ 15,  1,   8,   0, 80    },
	{ 15,  2,   8,   0, 224   },
	{ 15,  3,   9,   0, 416   },
	{ 15,  4,   9,   0, 160   },
	{ 15,  5,   10,  0, 544   },
	{ 15,  6,   10,  0, 832   },
	{ 15,  7,   10,  0, 576   },
	{ 15,  8,   11,  0, 1408  },
	{ 15,  9,   11,  0, 384   },
	{ 15,  10,  11,  0, 640   },
	{ 15,  11,  11,  0, 1792  },
	{ 15,  12,  11,  0, 1280  },
	{ 15,  13,  11,  0, 1536  },
	{ 15,  14,  11,  0, 1024  },
	{ 15,  15,  8,   0, 192   },
	{ 100, 100, 100, 0, 0     },
};

const struct mp3decthing var70056ec0[] = {
	{ 0,   0,   4,   0, 15   },
	{ 0,   1,   4,   0, 11   },
	{ 0,   2,   6,   0, 29   },
	{ 0,   3,   7,   0, 5    },
	{ 0,   4,   8,   0, 73   },
	{ 0,   5,   9,   0, 193  },
	{ 0,   6,   9,   0, 62   },
	{ 0,   7,   10,  0, 310  },
	{ 0,   8,   10,  0, 342  },
	{ 0,   9,   11,  0, 1482 },
	{ 0,   10,  11,  0, 1418 },
	{ 0,   11,  11,  0, 1162 },
	{ 0,   12,  11,  0, 1458 },
	{ 0,   13,  11,  0, 1282 },
	{ 0,   14,  12,  0, 258  },
	{ 0,   15,  9,   0, 52   },
	{ 1,   0,   4,   0, 7    },
	{ 1,   1,   4,   0, 3    },
	{ 1,   2,   5,   0, 21   },
	{ 1,   3,   6,   0, 25   },
	{ 1,   4,   7,   0, 113  },
	{ 1,   5,   8,   0, 65   },
	{ 1,   6,   8,   0, 94   },
	{ 1,   7,   9,   0, 54   },
	{ 1,   8,   9,   0, 278  },
	{ 1,   9,   9,   0, 198  },
	{ 1,   10,  10,  0, 906  },
	{ 1,   11,  10,  0, 618  },
	{ 1,   12,  10,  0, 1010 },
	{ 1,   13,  10,  0, 594  },
	{ 1,   14,  10,  0, 930  },
	{ 1,   15,  8,   0, 84   },
	{ 2,   0,   6,   0, 61   },
	{ 2,   1,   5,   0, 13   },
	{ 2,   2,   6,   0, 37   },
	{ 2,   3,   7,   0, 41   },
	{ 2,   4,   7,   0, 17   },
	{ 2,   5,   8,   0, 1    },
	{ 2,   6,   8,   0, 30   },
	{ 2,   7,   9,   0, 374  },
	{ 2,   8,   9,   0, 486  },
	{ 2,   9,   9,   0, 134  },
	{ 2,   10,  9,   0, 218  },
	{ 2,   11,  10,  0, 170  },
	{ 2,   12,  10,  0, 882  },
	{ 2,   13,  10,  0, 914  },
	{ 2,   14,  11,  0, 1474 },
	{ 2,   15,  7,   0, 36   },
	{ 3,   0,   7,   0, 69   },
	{ 3,   1,   6,   0, 57   },
	{ 3,   2,   7,   0, 105  },
	{ 3,   3,   7,   0, 49   },
	{ 3,   4,   8,   0, 97   },
	{ 3,   5,   8,   0, 190  },
	{ 3,   6,   8,   0, 46   },
	{ 3,   7,   9,   0, 118  },
	{ 3,   8,   9,   0, 102  },
	{ 3,   9,   9,   0, 250  },
	{ 3,   10,  9,   0, 154  },
	{ 3,   11,  10,  0, 650  },
	{ 3,   12,  10,  0, 946  },
	{ 3,   13,  10,  0, 658  },
	{ 3,   14,  10,  0, 962  },
	{ 3,   15,  7,   0, 4    },
	{ 4,   0,   8,   0, 201  },
	{ 4,   1,   7,   0, 9    },
	{ 4,   2,   7,   0, 81   },
	{ 4,   3,   8,   0, 225  },
	{ 4,   4,   8,   0, 254  },
	{ 4,   5,   8,   0, 110  },
	{ 4,   6,   8,   0, 14   },
	{ 4,   7,   9,   0, 150  },
	{ 4,   8,   9,   0, 38   },
	{ 4,   9,   9,   0, 122  },
	{ 4,   10,  10,  0, 26   },
	{ 4,   11,  10,  0, 778  },
	{ 4,   12,  10,  0, 306  },
	{ 4,   13,  10,  0, 738  },
	{ 4,   14,  11,  0, 450  },
	{ 4,   15,  7,   0, 56   },
	{ 5,   0,   9,   0, 449  },
	{ 5,   1,   7,   0, 33   },
	{ 5,   2,   8,   0, 129  },
	{ 5,   3,   8,   0, 126  },
	{ 5,   4,   8,   0, 238  },
	{ 5,   5,   8,   0, 78   },
	{ 5,   6,   9,   0, 214  },
	{ 5,   7,   9,   0, 166  },
	{ 5,   8,   9,   0, 6    },
	{ 5,   9,   9,   0, 90   },
	{ 5,   10,  10,  0, 682  },
	{ 5,   11,  10,  0, 754  },
	{ 5,   12,  10,  0, 722  },
	{ 5,   13,  10,  0, 610  },
	{ 5,   14,  10,  0, 386  },
	{ 5,   15,  7,   0, 24   },
	{ 6,   0,   9,   0, 318  },
	{ 6,   1,   8,   0, 222  },
	{ 6,   2,   8,   0, 158  },
	{ 6,   3,   8,   0, 174  },
	{ 6,   4,   8,   0, 142  },
	{ 6,   5,   9,   0, 470  },
	{ 6,   6,   9,   0, 230  },
	{ 6,   7,   9,   0, 390  },
	{ 6,   8,   9,   0, 314  },
	{ 6,   9,   10,  0, 874  },
	{ 6,   10,  10,  0, 330  },
	{ 6,   11,  10,  0, 178  },
	{ 6,   12,  10,  0, 786  },
	{ 6,   13,  10,  0, 34   },
	{ 6,   14,  11,  0, 130  },
	{ 6,   15,  7,   0, 40   },
	{ 7,   0,   10,  0, 822  },
	{ 7,   1,   8,   0, 206  },
	{ 7,   2,   8,   0, 246  },
	{ 7,   3,   8,   0, 182  },
	{ 7,   4,   9,   0, 406  },
	{ 7,   5,   9,   0, 422  },
	{ 7,   6,   9,   0, 70   },
	{ 7,   7,   9,   0, 442  },
	{ 7,   8,   10,  0, 538  },
	{ 7,   9,   10,  0, 202  },
	{ 7,   10,  10,  0, 626  },
	{ 7,   11,  10,  0, 338  },
	{ 7,   12,  10,  0, 866  },
	{ 7,   13,  11,  0, 1602 },
	{ 7,   14,  11,  0, 1524 },
	{ 7,   15,  8,   0, 136  },
	{ 8,   0,   10,  0, 854  },
	{ 8,   1,   9,   0, 86   },
	{ 8,   2,   9,   0, 22   },
	{ 8,   3,   9,   0, 358  },
	{ 8,   4,   9,   0, 294  },
	{ 8,   5,   9,   0, 262  },
	{ 8,   6,   9,   0, 186  },
	{ 8,   7,   9,   0, 282  },
	{ 8,   8,   9,   0, 298  },
	{ 8,   9,   10,  0, 10   },
	{ 8,   10,  10,  0, 978  },
	{ 8,   11,  10,  0, 482  },
	{ 8,   12,  10,  0, 194  },
	{ 8,   13,  11,  0, 514  },
	{ 8,   14,  11,  0, 1268 },
	{ 8,   15,  8,   0, 8    },
	{ 9,   0,   10,  0, 970  },
	{ 9,   1,   9,   0, 454  },
	{ 9,   2,   9,   0, 326  },
	{ 9,   3,   9,   0, 506  },
	{ 9,   4,   9,   0, 378  },
	{ 9,   5,   9,   0, 346  },
	{ 9,   6,   9,   0, 234  },
	{ 9,   7,   10,  0, 714  },
	{ 9,   8,   10,  0, 522  },
	{ 9,   9,   10,  0, 562  },
	{ 9,   10,  10,  0, 530  },
	{ 9,   11,  10,  0, 802  },
	{ 9,   12,  11,  0, 1154 },
	{ 9,   13,  11,  0, 1780 },
	{ 9,   14,  11,  0, 1652 },
	{ 9,   15,  8,   0, 208  },
	{ 10,  0,   11,  0, 458  },
	{ 10,  1,   9,   0, 58   },
	{ 10,  2,   9,   0, 474  },
	{ 10,  3,   9,   0, 410  },
	{ 10,  4,   9,   0, 490  },
	{ 10,  5,   10,  0, 106  },
	{ 10,  6,   10,  0, 842  },
	{ 10,  7,   10,  0, 370  },
	{ 10,  8,   10,  0, 50   },
	{ 10,  9,   10,  0, 274  },
	{ 10,  10,  10,  0, 674  },
	{ 10,  11,  11,  0, 578  },
	{ 10,  12,  11,  0, 2036 },
	{ 10,  13,  11,  0, 1396 },
	{ 10,  14,  11,  0, 948  },
	{ 10,  15,  8,   0, 80   },
	{ 11,  0,   11,  0, 394  },
	{ 11,  1,   10,  0, 362  },
	{ 11,  2,   9,   0, 426  },
	{ 11,  3,   9,   0, 42   },
	{ 11,  4,   9,   0, 74   },
	{ 11,  5,   10,  0, 498  },
	{ 11,  6,   10,  0, 690  },
	{ 11,  7,   10,  0, 850  },
	{ 11,  8,   10,  0, 994  },
	{ 11,  9,   10,  0, 162  },
	{ 11,  10,  10,  0, 898  },
	{ 11,  11,  11,  0, 1026 },
	{ 11,  12,  11,  0, 1908 },
	{ 11,  13,  11,  0, 116  },
	{ 11,  14,  11,  0, 692  },
	{ 11,  15,  8,   0, 96   },
	{ 12,  0,   11,  0, 138  },
	{ 12,  1,   10,  0, 266  },
	{ 12,  2,   10,  0, 242  },
	{ 12,  3,   10,  0, 114  },
	{ 12,  4,   10,  0, 818  },
	{ 12,  5,   10,  0, 466  },
	{ 12,  6,   10,  0, 146  },
	{ 12,  7,   10,  0, 226  },
	{ 12,  8,   10,  0, 706  },
	{ 12,  9,   10,  0, 642  },
	{ 12,  10,  11,  0, 2    },
	{ 12,  11,  11,  0, 244  },
	{ 12,  12,  11,  0, 628  },
	{ 12,  13,  11,  0, 436  },
	{ 12,  14,  11,  0, 1844 },
	{ 12,  15,  8,   0, 32   },
	{ 13,  0,   11,  0, 434  },
	{ 13,  1,   10,  0, 210  },
	{ 13,  2,   10,  0, 82   },
	{ 13,  3,   10,  0, 402  },
	{ 13,  4,   10,  0, 18   },
	{ 13,  5,   10,  0, 354  },
	{ 13,  6,   10,  0, 546  },
	{ 13,  7,   10,  0, 322  },
	{ 13,  8,   11,  0, 1538 },
	{ 13,  9,   11,  0, 500  },
	{ 13,  10,  11,  0, 884  },
	{ 13,  11,  11,  0, 1140 },
	{ 13,  12,  11,  0, 1460 },
	{ 13,  13,  11,  0, 1204 },
	{ 13,  14,  11,  0, 1332 },
	{ 13,  15,  8,   0, 64   },
	{ 14,  0,   12,  0, 2306 },
	{ 14,  1,   10,  0, 98   },
	{ 14,  2,   10,  0, 418  },
	{ 14,  3,   10,  0, 290  },
	{ 14,  4,   10,  0, 834  },
	{ 14,  5,   10,  0, 66   },
	{ 14,  6,   10,  0, 770  },
	{ 14,  7,   11,  0, 1012 },
	{ 14,  8,   11,  0, 756  },
	{ 14,  9,   11,  0, 372  },
	{ 14,  10,  11,  0, 1972 },
	{ 14,  11,  11,  0, 1716 },
	{ 14,  12,  11,  0, 180  },
	{ 14,  13,  11,  0, 820  },
	{ 14,  14,  11,  0, 308  },
	{ 14,  15,  8,   0, 0    },
	{ 15,  0,   8,   0, 212  },
	{ 15,  1,   7,   0, 20   },
	{ 15,  2,   7,   0, 100  },
	{ 15,  3,   7,   0, 68   },
	{ 15,  4,   7,   0, 120  },
	{ 15,  5,   7,   0, 88   },
	{ 15,  6,   7,   0, 104  },
	{ 15,  7,   7,   0, 72   },
	{ 15,  8,   7,   0, 112  },
	{ 15,  9,   7,   0, 48   },
	{ 15,  10,  7,   0, 16   },
	{ 15,  11,  8,   0, 224  },
	{ 15,  12,  8,   0, 160  },
	{ 15,  13,  8,   0, 192  },
	{ 15,  14,  8,   0, 128  },
	{ 15,  15,  4,   0, 12   },
	{ 100, 100, 100, 0, 0    },
};

const struct mp3decthing var700576c8[] = {
	{ 0,   0,   1,   0, 1  },
	{ 1,   1,   4,   0, 10 },
	{ 2,   2,   4,   0, 2  },
	{ 3,   3,   5,   0, 20 },
	{ 4,   4,   4,   0, 6  },
	{ 5,   5,   6,   0, 40 },
	{ 6,   6,   5,   0, 4  },
	{ 7,   7,   6,   0, 8  },
	{ 8,   8,   4,   0, 14 },
	{ 9,   9,   5,   0, 24 },
	{ 10,  10,  5,   0, 12 },
	{ 11,  11,  6,   0, 0  },
	{ 12,  12,  5,   0, 28 },
	{ 13,  13,  6,   0, 16 },
	{ 14,  14,  6,   0, 48 },
	{ 15,  15,  6,   0, 32 },
	{ 100, 100, 100, 0, 0  },
};

const struct mp3decthing var70057750[] = {
	{ 0,   0,   4,   0, 15 },
	{ 1,   1,   4,   0, 7  },
	{ 2,   2,   4,   0, 11 },
	{ 3,   3,   4,   0, 3  },
	{ 4,   4,   4,   0, 13 },
	{ 5,   5,   4,   0, 5  },
	{ 6,   6,   4,   0, 9  },
	{ 7,   7,   4,   0, 1  },
	{ 8,   8,   4,   0, 14 },
	{ 9,   9,   4,   0, 6  },
	{ 10,  10,  4,   0, 10 },
	{ 11,  11,  4,   0, 2  },
	{ 12,  12,  4,   0, 12 },
	{ 13,  13,  4,   0, 4  },
	{ 14,  14,  4,   0, 8  },
	{ 15,  15,  4,   0, 0  },
	{ 100, 100, 100, 0, 0  },
};

struct mp3decthing *var8005f670[] = {
	NULL,
	(struct mp3decthing *)var70054b40,
	(struct mp3decthing *)var70054b68,
	(struct mp3decthing *)var70054bb8,
	(struct mp3decthing *)var70054c08,
	(struct mp3decthing *)var70054c08,
	(struct mp3decthing *)var70054c90,
	(struct mp3decthing *)var70054d18,
	(struct mp3decthing *)var70054e40,
	(struct mp3decthing *)var70054f68,
	(struct mp3decthing *)var70055090,
	(struct mp3decthing *)var70055298,
	(struct mp3decthing *)var700554a0,
	(struct mp3decthing *)var700556a8,
	(struct mp3decthing *)var70055eb0,
	(struct mp3decthing *)var70055eb0,
	(struct mp3decthing *)var700566b8,
	(struct mp3decthing *)var700566b8,
	(struct mp3decthing *)var700566b8,
	(struct mp3decthing *)var700566b8,
	(struct mp3decthing *)var700566b8,
	(struct mp3decthing *)var700566b8,
	(struct mp3decthing *)var700566b8,
	(struct mp3decthing *)var700566b8,
	(struct mp3decthing *)var70056ec0,
	(struct mp3decthing *)var70056ec0,
	(struct mp3decthing *)var70056ec0,
	(struct mp3decthing *)var70056ec0,
	(struct mp3decthing *)var70056ec0,
	(struct mp3decthing *)var70056ec0,
	(struct mp3decthing *)var70056ec0,
	(struct mp3decthing *)var70056ec0,
	(struct mp3decthing *)var700576c8,
	(struct mp3decthing *)var70057750,
};

u8 *var8005f6f8 = NULL;
u8 *var8005f6fc = NULL;

const s32 var700577d8[34] = {
	0,  0,  0,  0,  0, 0, 0, 0, 0, 0,
	0,  0,  0,  0,  0, 0, 1, 2, 3, 4,
	6,  8,  10, 13, 4, 5, 6, 7, 8, 9,
	11, 13, -1, -1,
};

const s16 var70057860[2][3][22] = {
	{
		{ 5, 11, 17, 23, 29, 35, 43, 53, 65, 79, 95, 115, 139, 167, 199, 237, 283, 335, 395, 463, 521, 575 },
		{ 5, 11, 17, 23, 29, 35, 43, 53, 65, 79, 95, 113, 135, 161, 193, 231, 277, 331, 393, 463, 539, 575 },
		{ 5, 11, 17, 23, 29, 35, 43, 53, 65, 79, 95, 115, 139, 167, 199, 237, 283, 335, 395, 463, 521, 575 },
	}, {
		{ 3, 7,  11, 15, 19, 23, 29, 35, 43, 51, 61, 73,  89,  109, 133, 161, 195, 237, 287, 341, 417, 575 },
		{ 3, 7,  11, 15, 19, 23, 29, 35, 41, 49, 59, 71,  87,  105, 127, 155, 189, 229, 275, 329, 383, 575 },
		{ 3, 7,  11, 15, 19, 23, 29, 35, 43, 53, 65, 81,  101, 125, 155, 193, 239, 295, 363, 447, 549, 575 },
	},
};

const u8 var70057968[2][3][13] = {
	{
		{ 3, 7, 11, 17, 23, 31, 41, 55, 73, 99,  131, 173, 191 },
		{ 3, 7, 11, 17, 25, 35, 47, 61, 79, 103, 135, 179, 191 },
		{ 3, 7, 11, 17, 25, 35, 47, 61, 79, 103, 133, 173, 191 },
	}, {
		{ 3, 7, 11, 15, 21, 29, 39, 51, 65, 83,  105, 135, 191 },
		{ 3, 7, 11, 15, 21, 27, 37, 49, 63, 79,  99,  125, 191 },
		{ 3, 7, 11, 15, 21, 29, 41, 57, 77, 103, 137, 179, 191 },
	},
};

struct mp3decthing2 {
	s16 unk00[23];
	s16 unk2e[14];
};

const struct mp3decthing2 var700579b8[6] = {
	{ { 0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464, 522, 576 }, { 0, 4, 8, 12, 18, 24, 32, 42, 56, 74, 100, 132, 174, 192 } },
	{ { 0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 114, 136, 162, 194, 232, 278, 330, 394, 464, 540, 576 }, { 0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 136, 180, 192 } },
	{ { 0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464, 522, 576 }, { 0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 134, 174, 192 } },
	{ { 0, 4, 8,  12, 16, 20, 24, 30, 36, 44, 52, 62, 74,  90,  110, 134, 162, 196, 238, 288, 342, 418, 576 }, { 0, 4, 8, 12, 16, 22, 30, 40, 52, 66, 84,  106, 136, 192 } },
	{ { 0, 4, 8,  12, 16, 20, 24, 30, 36, 42, 50, 60, 72,  88,  106, 128, 156, 190, 230, 276, 330, 384, 576 }, { 0, 4, 8, 12, 16, 22, 28, 38, 50, 64, 80,  100, 126, 192 } },
	{ { 0, 4, 8,  12, 16, 20, 24, 30, 36, 44, 54, 66, 82,  102, 126, 156, 194, 240, 296, 364, 448, 550, 576 }, { 0, 4, 8, 12, 16, 22, 30, 42, 58, 78, 104, 138, 180, 192 } },
};

const u8 var70057b74[] = { 0, 6, 11, 16, 21, 0, 6, 12 };

const u8 var70057b7c[2][16] = {
	{ 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 },
	{ 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 },
};

const s16 var70057b9c[2][3][576] = {
	{
		{
			0,   1,   2,   3,   6,   7,   8,   9,   12,  13,  14,  15,  4,   5,   18,  19,
			10,  11,  24,  25,  16,  17,  30,  31,  20,  21,  22,  23,  26,  27,  28,  29,
			32,  33,  34,  35,  36,  37,  38,  39,  40,  41,  42,  43,  44,  45,  46,  47,
			48,  49,  50,  51,  52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,
			64,  65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,  90,  91,
			78,  79,  80,  81,  82,  83,  96,  97,  84,  85,  86,  87,  88,  89,  102, 103,
			92,  93,  94,  95,  108, 109, 110, 111, 112, 113, 98,  99,  100, 101, 114, 115,
			116, 117, 118, 119, 104, 105, 106, 107, 120, 121, 122, 123, 124, 125, 126, 127,
			128, 129, 130, 131, 144, 145, 146, 147, 148, 149, 162, 163, 132, 133, 134, 135,
			136, 137, 150, 151, 152, 153, 154, 155, 168, 169, 138, 139, 140, 141, 142, 143,
			156, 157, 158, 159, 160, 161, 174, 175, 164, 165, 166, 167, 180, 181, 182, 183,
			184, 185, 198, 199, 200, 201, 202, 203, 216, 217, 170, 171, 172, 173, 186, 187,
			188, 189, 190, 191, 204, 205, 206, 207, 208, 209, 222, 223, 176, 177, 178, 179,
			192, 193, 194, 195, 196, 197, 210, 211, 212, 213, 214, 215, 228, 229, 218, 219,
			220, 221, 234, 235, 236, 237, 238, 239, 252, 253, 254, 255, 256, 257, 270, 271,
			272, 273, 274, 275, 288, 289, 290, 291, 224, 225, 226, 227, 240, 241, 242, 243,
			244, 245, 258, 259, 260, 261, 262, 263, 276, 277, 278, 279, 280, 281, 294, 295,
			296, 297, 230, 231, 232, 233, 246, 247, 248, 249, 250, 251, 264, 265, 266, 267,
			268, 269, 282, 283, 284, 285, 286, 287, 300, 301, 302, 303, 292, 293, 306, 307,
			308, 309, 310, 311, 324, 325, 326, 327, 328, 329, 342, 343, 344, 345, 346, 347,
			360, 361, 362, 363, 364, 365, 378, 379, 380, 381, 382, 383, 298, 299, 312, 313,
			314, 315, 316, 317, 330, 331, 332, 333, 334, 335, 348, 349, 350, 351, 352, 353,
			366, 367, 368, 369, 370, 371, 384, 385, 386, 387, 388, 389, 304, 305, 318, 319,
			320, 321, 322, 323, 336, 337, 338, 339, 340, 341, 354, 355, 356, 357, 358, 359,
			372, 373, 374, 375, 376, 377, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
			400, 401, 414, 415, 416, 417, 418, 419, 432, 433, 434, 435, 436, 437, 450, 451,
			452, 453, 454, 455, 468, 469, 470, 471, 472, 473, 486, 487, 488, 489, 490, 491,
			504, 505, 506, 507, 508, 509, 402, 403, 404, 405, 406, 407, 420, 421, 422, 423,
			424, 425, 438, 439, 440, 441, 442, 443, 456, 457, 458, 459, 460, 461, 474, 475,
			476, 477, 478, 479, 492, 493, 494, 495, 496, 497, 510, 511, 512, 513, 514, 515,
			408, 409, 410, 411, 412, 413, 426, 427, 428, 429, 430, 431, 444, 445, 446, 447,
			448, 449, 462, 463, 464, 465, 466, 467, 480, 481, 482, 483, 484, 485, 498, 499,
			500, 501, 502, 503, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
			540, 541, 542, 543, 544, 545, 558, 559, 560, 561, 562, 563, 528, 529, 530, 531,
			532, 533, 546, 547, 548, 549, 550, 551, 564, 565, 566, 567, 568, 569, 534, 535,
			536, 537, 538, 539, 552, 553, 554, 555, 556, 557, 570, 571, 572, 573, 574, 575,
		}, {
			0,   1,   2,   3,   6,   7,   8,   9,   12,  13,  14,  15,  4,   5,   18,  19,
			10,  11,  24,  25,  16,  17,  30,  31,  20,  21,  22,  23,  26,  27,  28,  29,
			32,  33,  34,  35,  36,  37,  38,  39,  40,  41,  42,  43,  44,  45,  46,  47,
			48,  49,  50,  51,  52,  53,  54,  55,  56,  57,  58,  59,  72,  73,  60,  61,
			62,  63,  64,  65,  78,  79,  66,  67,  68,  69,  70,  71,  84,  85,  74,  75,
			76,  77,  90,  91,  92,  93,  94,  95,  80,  81,  82,  83,  96,  97,  98,  99,
			100, 101, 86,  87,  88,  89,  102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
			112, 113, 126, 127, 128, 129, 130, 131, 114, 115, 116, 117, 118, 119, 132, 133,
			134, 135, 136, 137, 120, 121, 122, 123, 124, 125, 138, 139, 140, 141, 142, 143,
			144, 145, 146, 147, 148, 149, 162, 163, 164, 165, 166, 167, 180, 181, 150, 151,
			152, 153, 154, 155, 168, 169, 170, 171, 172, 173, 186, 187, 156, 157, 158, 159,
			160, 161, 174, 175, 176, 177, 178, 179, 192, 193, 182, 183, 184, 185, 198, 199,
			200, 201, 202, 203, 216, 217, 218, 219, 220, 221, 234, 235, 188, 189, 190, 191,
			204, 205, 206, 207, 208, 209, 222, 223, 224, 225, 226, 227, 240, 241, 194, 195,
			196, 197, 210, 211, 212, 213, 214, 215, 228, 229, 230, 231, 232, 233, 246, 247,
			236, 237, 238, 239, 252, 253, 254, 255, 256, 257, 270, 271, 272, 273, 274, 275,
			288, 289, 290, 291, 292, 293, 306, 307, 242, 243, 244, 245, 258, 259, 260, 261,
			262, 263, 276, 277, 278, 279, 280, 281, 294, 295, 296, 297, 298, 299, 312, 313,
			248, 249, 250, 251, 264, 265, 266, 267, 268, 269, 282, 283, 284, 285, 286, 287,
			300, 301, 302, 303, 304, 305, 318, 319, 308, 309, 310, 311, 324, 325, 326, 327,
			328, 329, 342, 343, 344, 345, 346, 347, 360, 361, 362, 363, 364, 365, 378, 379,
			380, 381, 382, 383, 396, 397, 398, 399, 314, 315, 316, 317, 330, 331, 332, 333,
			334, 335, 348, 349, 350, 351, 352, 353, 366, 367, 368, 369, 370, 371, 384, 385,
			386, 387, 388, 389, 402, 403, 404, 405, 320, 321, 322, 323, 336, 337, 338, 339,
			340, 341, 354, 355, 356, 357, 358, 359, 372, 373, 374, 375, 376, 377, 390, 391,
			392, 393, 394, 395, 408, 409, 410, 411, 400, 401, 414, 415, 416, 417, 418, 419,
			432, 433, 434, 435, 436, 437, 450, 451, 452, 453, 454, 455, 468, 469, 470, 471,
			472, 473, 486, 487, 488, 489, 490, 491, 504, 505, 506, 507, 508, 509, 522, 523,
			524, 525, 526, 527, 406, 407, 420, 421, 422, 423, 424, 425, 438, 439, 440, 441,
			442, 443, 456, 457, 458, 459, 460, 461, 474, 475, 476, 477, 478, 479, 492, 493,
			494, 495, 496, 497, 510, 511, 512, 513, 514, 515, 528, 529, 530, 531, 532, 533,
			412, 413, 426, 427, 428, 429, 430, 431, 444, 445, 446, 447, 448, 449, 462, 463,
			464, 465, 466, 467, 480, 481, 482, 483, 484, 485, 498, 499, 500, 501, 502, 503,
			516, 517, 518, 519, 520, 521, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
			544, 545, 558, 559, 560, 561, 562, 563, 546, 547, 548, 549, 550, 551, 564, 565,
			566, 567, 568, 569, 552, 553, 554, 555, 556, 557, 570, 571, 572, 573, 574, 575,
		}, {
			0,   1,   2,   3,   6,   7,   8,   9,   12,  13,  14,  15,  4,   5,   18,  19,
			10,  11,  24,  25,  16,  17,  30,  31,  20,  21,  22,  23,  26,  27,  28,  29,
			32,  33,  34,  35,  36,  37,  38,  39,  40,  41,  42,  43,  44,  45,  46,  47,
			48,  49,  50,  51,  52,  53,  54,  55,  56,  57,  58,  59,  72,  73,  60,  61,
			62,  63,  64,  65,  78,  79,  66,  67,  68,  69,  70,  71,  84,  85,  74,  75,
			76,  77,  90,  91,  92,  93,  94,  95,  80,  81,  82,  83,  96,  97,  98,  99,
			100, 101, 86,  87,  88,  89,  102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
			112, 113, 126, 127, 128, 129, 130, 131, 114, 115, 116, 117, 118, 119, 132, 133,
			134, 135, 136, 137, 120, 121, 122, 123, 124, 125, 138, 139, 140, 141, 142, 143,
			144, 145, 146, 147, 148, 149, 162, 163, 164, 165, 166, 167, 180, 181, 150, 151,
			152, 153, 154, 155, 168, 169, 170, 171, 172, 173, 186, 187, 156, 157, 158, 159,
			160, 161, 174, 175, 176, 177, 178, 179, 192, 193, 182, 183, 184, 185, 198, 199,
			200, 201, 202, 203, 216, 217, 218, 219, 220, 221, 234, 235, 188, 189, 190, 191,
			204, 205, 206, 207, 208, 209, 222, 223, 224, 225, 226, 227, 240, 241, 194, 195,
			196, 197, 210, 211, 212, 213, 214, 215, 228, 229, 230, 231, 232, 233, 246, 247,
			236, 237, 238, 239, 252, 253, 254, 255, 256, 257, 270, 271, 272, 273, 274, 275,
			288, 289, 290, 291, 292, 293, 306, 307, 242, 243, 244, 245, 258, 259, 260, 261,
			262, 263, 276, 277, 278, 279, 280, 281, 294, 295, 296, 297, 298, 299, 312, 313,
			248, 249, 250, 251, 264, 265, 266, 267, 268, 269, 282, 283, 284, 285, 286, 287,
			300, 301, 302, 303, 304, 305, 318, 319, 308, 309, 310, 311, 324, 325, 326, 327,
			328, 329, 342, 343, 344, 345, 346, 347, 360, 361, 362, 363, 364, 365, 378, 379,
			380, 381, 382, 383, 396, 397, 314, 315, 316, 317, 330, 331, 332, 333, 334, 335,
			348, 349, 350, 351, 352, 353, 366, 367, 368, 369, 370, 371, 384, 385, 386, 387,
			388, 389, 402, 403, 320, 321, 322, 323, 336, 337, 338, 339, 340, 341, 354, 355,
			356, 357, 358, 359, 372, 373, 374, 375, 376, 377, 390, 391, 392, 393, 394, 395,
			408, 409, 398, 399, 400, 401, 414, 415, 416, 417, 418, 419, 432, 433, 434, 435,
			436, 437, 450, 451, 452, 453, 454, 455, 468, 469, 470, 471, 472, 473, 486, 487,
			488, 489, 490, 491, 504, 505, 506, 507, 508, 509, 404, 405, 406, 407, 420, 421,
			422, 423, 424, 425, 438, 439, 440, 441, 442, 443, 456, 457, 458, 459, 460, 461,
			474, 475, 476, 477, 478, 479, 492, 493, 494, 495, 496, 497, 510, 511, 512, 513,
			514, 515, 410, 411, 412, 413, 426, 427, 428, 429, 430, 431, 444, 445, 446, 447,
			448, 449, 462, 463, 464, 465, 466, 467, 480, 481, 482, 483, 484, 485, 498, 499,
			500, 501, 502, 503, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
			540, 541, 542, 543, 544, 545, 558, 559, 560, 561, 562, 563, 528, 529, 530, 531,
			532, 533, 546, 547, 548, 549, 550, 551, 564, 565, 566, 567, 568, 569, 534, 535,
			536, 537, 538, 539, 552, 553, 554, 555, 556, 557, 570, 571, 572, 573, 574, 575,
		},
	}, {
		{
			0,   1,   2,   3,   6,   7,   8,   9,   12,  13,  14,  15,  4,   5,   18,  19,
			10,  11,  24,  25,  16,  17,  30,  31,  20,  21,  22,  23,  26,  27,  28,  29,
			32,  33,  34,  35,  36,  37,  38,  39,  42,  43,  44,  45,  48,  49,  50,  51,
			40,  41,  54,  55,  56,  57,  46,  47,  60,  61,  62,  63,  52,  53,  66,  67,
			68,  69,  58,  59,  72,  73,  74,  75,  76,  77,  64,  65,  78,  79,  80,  81,
			82,  83,  70,  71,  84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,
			108, 109, 110, 111, 96,  97,  98,  99,  100, 101, 114, 115, 116, 117, 102, 103,
			104, 105, 106, 107, 120, 121, 122, 123, 112, 113, 126, 127, 128, 129, 130, 131,
			144, 145, 146, 147, 118, 119, 132, 133, 134, 135, 136, 137, 150, 151, 152, 153,
			124, 125, 138, 139, 140, 141, 142, 143, 156, 157, 158, 159, 148, 149, 162, 163,
			164, 165, 166, 167, 180, 181, 182, 183, 184, 185, 154, 155, 168, 169, 170, 171,
			172, 173, 186, 187, 188, 189, 190, 191, 160, 161, 174, 175, 176, 177, 178, 179,
			192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 216, 217, 218, 219,
			220, 221, 234, 235, 236, 237, 238, 239, 204, 205, 206, 207, 208, 209, 222, 223,
			224, 225, 226, 227, 240, 241, 242, 243, 244, 245, 210, 211, 212, 213, 214, 215,
			228, 229, 230, 231, 232, 233, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
			256, 257, 270, 271, 272, 273, 274, 275, 288, 289, 290, 291, 292, 293, 306, 307,
			308, 309, 258, 259, 260, 261, 262, 263, 276, 277, 278, 279, 280, 281, 294, 295,
			296, 297, 298, 299, 312, 313, 314, 315, 264, 265, 266, 267, 268, 269, 282, 283,
			284, 285, 286, 287, 300, 301, 302, 303, 304, 305, 318, 319, 320, 321, 310, 311,
			324, 325, 326, 327, 328, 329, 342, 343, 344, 345, 346, 347, 360, 361, 362, 363,
			364, 365, 378, 379, 380, 381, 382, 383, 396, 397, 398, 399, 316, 317, 330, 331,
			332, 333, 334, 335, 348, 349, 350, 351, 352, 353, 366, 367, 368, 369, 370, 371,
			384, 385, 386, 387, 388, 389, 402, 403, 404, 405, 322, 323, 336, 337, 338, 339,
			340, 341, 354, 355, 356, 357, 358, 359, 372, 373, 374, 375, 376, 377, 390, 391,
			392, 393, 394, 395, 408, 409, 410, 411, 400, 401, 414, 415, 416, 417, 418, 419,
			432, 433, 434, 435, 436, 437, 450, 451, 452, 453, 454, 455, 468, 469, 470, 471,
			472, 473, 486, 487, 488, 489, 490, 491, 504, 505, 506, 507, 508, 509, 522, 523,
			524, 525, 526, 527, 540, 541, 542, 543, 544, 545, 558, 559, 560, 561, 562, 563,
			406, 407, 420, 421, 422, 423, 424, 425, 438, 439, 440, 441, 442, 443, 456, 457,
			458, 459, 460, 461, 474, 475, 476, 477, 478, 479, 492, 493, 494, 495, 496, 497,
			510, 511, 512, 513, 514, 515, 528, 529, 530, 531, 532, 533, 546, 547, 548, 549,
			550, 551, 564, 565, 566, 567, 568, 569, 412, 413, 426, 427, 428, 429, 430, 431,
			444, 445, 446, 447, 448, 449, 462, 463, 464, 465, 466, 467, 480, 481, 482, 483,
			484, 485, 498, 499, 500, 501, 502, 503, 516, 517, 518, 519, 520, 521, 534, 535,
			536, 537, 538, 539, 552, 553, 554, 555, 556, 557, 570, 571, 572, 573, 574, 575,
		}, {
			0,   1,   2,   3,   6,   7,   8,   9,   12,  13,  14,  15,  4,   5,   18,  19,
			10,  11,  24,  25,  16,  17,  30,  31,  20,  21,  22,  23,  26,  27,  28,  29,
			32,  33,  34,  35,  36,  37,  38,  39,  42,  43,  44,  45,  48,  49,  50,  51,
			40,  41,  54,  55,  56,  57,  46,  47,  60,  61,  62,  63,  52,  53,  66,  67,
			68,  69,  58,  59,  72,  73,  74,  75,  64,  65,  78,  79,  80,  81,  70,  71,
			84,  85,  86,  87,  76,  77,  90,  91,  92,  93,  94,  95,  108, 109, 82,  83,
			96,  97,  98,  99,  100, 101, 114, 115, 88,  89,  102, 103, 104, 105, 106, 107,
			120, 121, 110, 111, 112, 113, 126, 127, 128, 129, 130, 131, 144, 145, 116, 117,
			118, 119, 132, 133, 134, 135, 136, 137, 150, 151, 122, 123, 124, 125, 138, 139,
			140, 141, 142, 143, 156, 157, 146, 147, 148, 149, 162, 163, 164, 165, 166, 167,
			180, 181, 182, 183, 152, 153, 154, 155, 168, 169, 170, 171, 172, 173, 186, 187,
			188, 189, 158, 159, 160, 161, 174, 175, 176, 177, 178, 179, 192, 193, 194, 195,
			184, 185, 198, 199, 200, 201, 202, 203, 216, 217, 218, 219, 220, 221, 234, 235,
			190, 191, 204, 205, 206, 207, 208, 209, 222, 223, 224, 225, 226, 227, 240, 241,
			196, 197, 210, 211, 212, 213, 214, 215, 228, 229, 230, 231, 232, 233, 246, 247,
			236, 237, 238, 239, 252, 253, 254, 255, 256, 257, 270, 271, 272, 273, 274, 275,
			288, 289, 290, 291, 242, 243, 244, 245, 258, 259, 260, 261, 262, 263, 276, 277,
			278, 279, 280, 281, 294, 295, 296, 297, 248, 249, 250, 251, 264, 265, 266, 267,
			268, 269, 282, 283, 284, 285, 286, 287, 300, 301, 302, 303, 292, 293, 306, 307,
			308, 309, 310, 311, 324, 325, 326, 327, 328, 329, 342, 343, 344, 345, 346, 347,
			360, 361, 362, 363, 364, 365, 298, 299, 312, 313, 314, 315, 316, 317, 330, 331,
			332, 333, 334, 335, 348, 349, 350, 351, 352, 353, 366, 367, 368, 369, 370, 371,
			304, 305, 318, 319, 320, 321, 322, 323, 336, 337, 338, 339, 340, 341, 354, 355,
			356, 357, 358, 359, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
			396, 397, 398, 399, 400, 401, 414, 415, 416, 417, 418, 419, 432, 433, 434, 435,
			436, 437, 450, 451, 452, 453, 454, 455, 468, 469, 470, 471, 472, 473, 486, 487,
			488, 489, 490, 491, 504, 505, 506, 507, 508, 509, 522, 523, 524, 525, 526, 527,
			540, 541, 542, 543, 544, 545, 558, 559, 560, 561, 562, 563, 384, 385, 386, 387,
			388, 389, 402, 403, 404, 405, 406, 407, 420, 421, 422, 423, 424, 425, 438, 439,
			440, 441, 442, 443, 456, 457, 458, 459, 460, 461, 474, 475, 476, 477, 478, 479,
			492, 493, 494, 495, 496, 497, 510, 511, 512, 513, 514, 515, 528, 529, 530, 531,
			532, 533, 546, 547, 548, 549, 550, 551, 564, 565, 566, 567, 568, 569, 390, 391,
			392, 393, 394, 395, 408, 409, 410, 411, 412, 413, 426, 427, 428, 429, 430, 431,
			444, 445, 446, 447, 448, 449, 462, 463, 464, 465, 466, 467, 480, 481, 482, 483,
			484, 485, 498, 499, 500, 501, 502, 503, 516, 517, 518, 519, 520, 521, 534, 535,
			536, 537, 538, 539, 552, 553, 554, 555, 556, 557, 570, 571, 572, 573, 574, 575,
		}, {
			0,   1,   2,   3,   6,   7,   8,   9,   12,  13,  14,  15,  4,   5,   18,  19,
			10,  11,  24,  25,  16,  17,  30,  31,  20,  21,  22,  23,  26,  27,  28,  29,
			32,  33,  34,  35,  36,  37,  38,  39,  42,  43,  44,  45,  48,  49,  50,  51,
			40,  41,  54,  55,  56,  57,  46,  47,  60,  61,  62,  63,  52,  53,  66,  67,
			68,  69,  58,  59,  72,  73,  74,  75,  76,  77,  64,  65,  78,  79,  80,  81,
			82,  83,  70,  71,  84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,
			108, 109, 110, 111, 112, 113, 96,  97,  98,  99,  100, 101, 114, 115, 116, 117,
			118, 119, 102, 103, 104, 105, 106, 107, 120, 121, 122, 123, 124, 125, 126, 127,
			128, 129, 130, 131, 144, 145, 146, 147, 148, 149, 162, 163, 164, 165, 132, 133,
			134, 135, 136, 137, 150, 151, 152, 153, 154, 155, 168, 169, 170, 171, 138, 139,
			140, 141, 142, 143, 156, 157, 158, 159, 160, 161, 174, 175, 176, 177, 166, 167,
			180, 181, 182, 183, 184, 185, 198, 199, 200, 201, 202, 203, 216, 217, 218, 219,
			220, 221, 172, 173, 186, 187, 188, 189, 190, 191, 204, 205, 206, 207, 208, 209,
			222, 223, 224, 225, 226, 227, 178, 179, 192, 193, 194, 195, 196, 197, 210, 211,
			212, 213, 214, 215, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
			252, 253, 254, 255, 256, 257, 270, 271, 272, 273, 274, 275, 288, 289, 290, 291,
			292, 293, 306, 307, 240, 241, 242, 243, 244, 245, 258, 259, 260, 261, 262, 263,
			276, 277, 278, 279, 280, 281, 294, 295, 296, 297, 298, 299, 312, 313, 246, 247,
			248, 249, 250, 251, 264, 265, 266, 267, 268, 269, 282, 283, 284, 285, 286, 287,
			300, 301, 302, 303, 304, 305, 318, 319, 308, 309, 310, 311, 324, 325, 326, 327,
			328, 329, 342, 343, 344, 345, 346, 347, 360, 361, 362, 363, 364, 365, 378, 379,
			380, 381, 382, 383, 396, 397, 398, 399, 400, 401, 314, 315, 316, 317, 330, 331,
			332, 333, 334, 335, 348, 349, 350, 351, 352, 353, 366, 367, 368, 369, 370, 371,
			384, 385, 386, 387, 388, 389, 402, 403, 404, 405, 406, 407, 320, 321, 322, 323,
			336, 337, 338, 339, 340, 341, 354, 355, 356, 357, 358, 359, 372, 373, 374, 375,
			376, 377, 390, 391, 392, 393, 394, 395, 408, 409, 410, 411, 412, 413, 414, 415,
			416, 417, 418, 419, 432, 433, 434, 435, 436, 437, 450, 451, 452, 453, 454, 455,
			468, 469, 470, 471, 472, 473, 486, 487, 488, 489, 490, 491, 504, 505, 506, 507,
			508, 509, 522, 523, 524, 525, 526, 527, 420, 421, 422, 423, 424, 425, 438, 439,
			440, 441, 442, 443, 456, 457, 458, 459, 460, 461, 474, 475, 476, 477, 478, 479,
			492, 493, 494, 495, 496, 497, 510, 511, 512, 513, 514, 515, 528, 529, 530, 531,
			532, 533, 426, 427, 428, 429, 430, 431, 444, 445, 446, 447, 448, 449, 462, 463,
			464, 465, 466, 467, 480, 481, 482, 483, 484, 485, 498, 499, 500, 501, 502, 503,
			516, 517, 518, 519, 520, 521, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
			544, 545, 558, 559, 560, 561, 562, 563, 546, 547, 548, 549, 550, 551, 564, 565,
			566, 567, 568, 569, 552, 553, 554, 555, 556, 557, 570, 571, 572, 573, 574, 575,
		},
	},
};

const f32 var7005969c[] = {
	-0.51449573040009,
	-0.47173196077347,
	-0.31337743997574,
	-0.18191319704056,
	-0.094574190676212,
	-0.040965583175421,
	-0.01419856864959,
	-0.0036999746225774,
};

const f32 var700596bc[] = {
	0.85749292373657,
	0.88174200057983,
	0.94962865114212,
	0.9833145737648,
	0.99551779031754,
	0.99916058778763,
	0.99989920854568,
	0.99999314546585,
};

const u32 var700596dc[2][15] = {
	{ 0, 8000,  16000, 24000, 32000, 40000, 48000, 56000, 64000,  80000,  96000,  112000, 128000, 144000, 160000 },
	{ 0, 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 160000, 192000, 224000, 256000, 320000 },
};

const u32 var70059754[2][4] = {
	{ 22050, 24000, 16000, 22050 },
	{ 44100, 48000, 32000, 44100 },
};

const u32 var70059774[] = {0xbd03ba34};
const u32 var70059778[] = {0x3dd41398};
const u32 var7005977c[] = {0xbe3aec8d};
const u32 var70059780[] = {0x3e8890b4};
const u32 var70059784[] = {0xbeb50508};
const u32 var70059788[] = {0x3ee17918};
const u32 var7005978c[] = {0xbf0649c3};
const u32 var70059790[] = {0x3f1a8273};
const u32 var70059794[] = {0xbf2cc954};
const u32 var70059798[] = {0x3f3c902e};
const u32 var7005979c[] = {0xbf495c64};
const u32 var700597a0[] = {0x3f52ca58};
const u32 var700597a4[] = {0xbf5890a3};
const u32 var700597a8[] = {0x3f5a8284};
const u32 var700597ac[] = {0xbf5890a3};
const u32 var700597b0[] = {0x3f52ca47};
const u32 var700597b4[] = {0xbf495c64};
const u32 var700597b8[] = {0x3f3c902e};
const u32 var700597bc[] = {0xbf2cc954};
const u32 var700597c0[] = {0x3f1a8273};
const u32 var700597c4[] = {0xbf0649d4};
const u32 var700597c8[] = {0x3ee1793a};
const u32 var700597cc[] = {0xbeb504e6};
const u32 var700597d0[] = {0x3e8890b4};
const u32 var700597d4[] = {0xbe3aecd0};
const u32 var700597d8[] = {0x3dd41398};
const u32 var700597dc[] = {0xbd03ba34};
const u32 var700597e0[] = {0xbcf168f9};
const u32 var700597e4[] = {0x3da2bb66};
const u32 var700597e8[] = {0xbdee2b06};
const u32 var700597ec[] = {0x3e0e2ef5};
const u32 var700597f0[] = {0xbe15f5f1};
const u32 var700597f4[] = {0x3e0e2ef5};
const u32 var700597f8[] = {0xbdee2b06};
const u32 var700597fc[] = {0x3da2bb66};
const u32 var70059800[] = {0xbcf168f9};
const u32 var70059804[] = {0xbd03ba34};
const u32 var70059808[] = {0x3dd41398};
const u32 var7005980c[] = {0xbe3aec8d};
const u32 var70059810[] = {0x3e8890b4};
const u32 var70059814[] = {0xbeb50508};
const u32 var70059818[] = {0x3ee17918};
const u32 var7005981c[] = {0xbf0649c3};
const u32 var70059820[] = {0x3f1a8273};
const u32 var70059824[] = {0xbf2cc954};
const u32 var70059828[] = {0x3f3c902e};
const u32 var7005982c[] = {0xbf495c64};
const u32 var70059830[] = {0x3f52ca58};
const u32 var70059834[] = {0xbf5890a3};
const u32 var70059838[] = {0x3f5a8284};
const u32 var7005983c[] = {0xbf5890a3};
const u32 var70059840[] = {0x3f52ca47};
const u32 var70059844[] = {0xbf495c64};
const u32 var70059848[] = {0x3f3c902e};
const u32 var7005984c[] = {0xbf2cf377};
const u32 var70059850[] = {0x3f1bd7c3};
const u32 var70059854[] = {0xbf098c7e};
const u32 var70059858[] = {0x3eec6a5d};
const u32 var7005985c[] = {0xbec3ef07};
const u32 var70059860[] = {0x3e99f623};
const u32 var70059864[] = {0xbe5bbcf5};
const u32 var70059868[] = {0x3df6f7e4};
const u32 var7005986c[] = {0xbd0dbf05};
const u32 var70059870[] = {0xbcd987c6};
const u32 var70059874[] = {0x3d4c985f};
const u32 var70059878[] = {0xbce76ea4};
const u32 var7005987c[] = {0x00000000};
const u32 var70059880[] = {0x00000000};
const u32 var70059884[] = {0x00000000};
const u32 var70059888[] = {0x00000000};
const u32 var7005988c[] = {0x00000000};
const u32 var70059890[] = {0x00000000};
const u32 var70059894[] = {0xbdd41398};
const u32 var70059898[] = {0x3eb50508};
const u32 var7005989c[] = {0xbf1a8273};
const u32 var700598a0[] = {0x3f495c64};
const u32 var700598a4[] = {0xbf5a8284};
const u32 var700598a8[] = {0x3f495c64};
const u32 var700598ac[] = {0xbf1a8273};
const u32 var700598b0[] = {0x3eb504e6};
const u32 var700598b4[] = {0xbdd41398};
const u32 var700598b8[] = {0xbda2bb66};
const u32 var700598bc[] = {0x3e15f5f1};
const u32 var700598c0[] = {0xbda2bb66};
const u32 var700598c4[] = {0x00000000};
const u32 var700598c8[] = {0x00000000};
const u32 var700598cc[] = {0x00000000};
const u32 var700598d0[] = {0x00000000};
const u32 var700598d4[] = {0x00000000};
const u32 var700598d8[] = {0x00000000};
const u32 var700598dc[] = {0x00000000};
const u32 var700598e0[] = {0x00000000};
const u32 var700598e4[] = {0x00000000};
const u32 var700598e8[] = {0x00000000};
const u32 var700598ec[] = {0x00000000};
const u32 var700598f0[] = {0x00000000};
const u32 var700598f4[] = {0x00000000};
const u32 var700598f8[] = {0x00000000};
const u32 var700598fc[] = {0x00000000};
const u32 var70059900[] = {0x00000000};
const u32 var70059904[] = {0x00000000};
const u32 var70059908[] = {0x00000000};
const u32 var7005990c[] = {0x00000000};
const u32 var70059910[] = {0x00000000};
const u32 var70059914[] = {0x00000000};
const u32 var70059918[] = {0x00000000};
const u32 var7005991c[] = {0x00000000};
const u32 var70059920[] = {0x00000000};
const u32 var70059924[] = {0x00000000};
const u32 var70059928[] = {0x00000000};
const u32 var7005992c[] = {0x00000000};
const u32 var70059930[] = {0x00000000};
const u32 var70059934[] = {0x00000000};
const u32 var70059938[] = {0x00000000};
const u32 var7005993c[] = {0xbe027d89};
const u32 var70059940[] = {0x3ec24207};
const u32 var70059944[] = {0xbf1bb1d1};
const u32 var70059948[] = {0x3f4ae7b4};
const u32 var7005994c[] = {0xbf6a7d67};
const u32 var70059950[] = {0x3f77cb2e};
const u32 var70059954[] = {0xbf7426cc};
const u32 var70059958[] = {0x3f6c8366};
const u32 var7005995c[] = {0xbf631327};
const u32 var70059960[] = {0x3f57e879};
const u32 var70059964[] = {0xbf4b192f};
const u32 var70059968[] = {0x3f3cbe2f};
const u32 var7005996c[] = {0xbf2cc954};
const u32 var70059970[] = {0x3f1a8273};
const u32 var70059974[] = {0xbf0649d4};
const u32 var70059978[] = {0x3ee1793a};
const u32 var7005997c[] = {0xbeb504e6};
const u32 var70059980[] = {0x3e8890b4};
const u32 var70059984[] = {0xbe3aecd0};
const u32 var70059988[] = {0x3dd41398};
const u32 var7005998c[] = {0xbd03ba34};
const u32 var70059990[] = {0xbcf168f9};
const u32 var70059994[] = {0x3da2bb66};
const u32 var70059998[] = {0xbdee2b06};
const u32 var7005999c[] = {0x3e0e2ef5};
const u32 var700599a0[] = {0xbe15f5f1};
const u32 var700599a4[] = {0x3e0e2ef5};
const u32 var700599a8[] = {0xbdee2b06};
const u32 var700599ac[] = {0x3da2bb66};
const u32 var700599b0[] = {0xbcf168f9};
const u32 var700599b4[] = {0xbe327e95};
const u32 var700599b8[] = {0xbf0483ed};
const u32 var700599bc[] = {0xbf586174};
const u32 var700599c0[] = {0xbf92d5e9};
const u32 var700599c4[] = {0xbfb504f7};
const u32 var700599c8[] = {0xbfd1b3f2};
const u32 var700599cc[] = {0xbfe803cd};
const u32 var700599d0[] = {0xbff746ed};
const u32 var700599d4[] = {0xbfff069a};
const u32 var700599d8[] = {0x3e327e95};
const u32 var700599dc[] = {0x3f0483ed};
const u32 var700599e0[] = {0x3f586174};
const u32 var700599e4[] = {0x3f92d5e9};
const u32 var700599e8[] = {0x3fb504f7};
const u32 var700599ec[] = {0x3fd1b3f2};
const u32 var700599f0[] = {0x3fe803cd};
const u32 var700599f4[] = {0x3ff746ed};
const u32 var700599f8[] = {0x3fff069a};
const u32 var700599fc[] = {0xbe327e95};
const u32 var70059a00[] = {0xbf0483ed};
const u32 var70059a04[] = {0xbf586174};
const u32 var70059a08[] = {0xbf92d5e9};
const u32 var70059a0c[] = {0xbfb504f7};
const u32 var70059a10[] = {0xbfd1b3f2};
const u32 var70059a14[] = {0xbfe803cd};
const u32 var70059a18[] = {0xbff746ed};
const u32 var70059a1c[] = {0xbfff069a};
const u32 var70059a20[] = {0x3e327e95};
const u32 var70059a24[] = {0x3f0483ed};
const u32 var70059a28[] = {0x3f586174};
const u32 var70059a2c[] = {0x3f92d5e9};
const u32 var70059a30[] = {0x3fb504f7};
const u32 var70059a34[] = {0x3fd1b3f2};
const u32 var70059a38[] = {0x3fe803cd};
const u32 var70059a3c[] = {0x3ff746ed};
const u32 var70059a40[] = {0x3fff069a};
const u32 var70059a44[] = {0xbf0483ed};
const u32 var70059a48[] = {0xbfb504d5};
const u32 var70059a4c[] = {0xbff746dc};
const u32 var70059a50[] = {0x3f0483ed};
const u32 var70059a54[] = {0x3fb504d5};
const u32 var70059a58[] = {0x3ff746dc};
const u32 var70059a5c[] = {0x00000000};
const u32 var70059a60[] = {0x00000000};
const u32 var70059a64[] = {0x00000000};
const u32 var70059a68[] = {0x00000000};
const u32 var70059a6c[] = {0x00000000};
const u32 var70059a70[] = {0x00000000};
const u32 var70059a74[] = {0x00000000};
const u32 var70059a78[] = {0x00000000};
const u32 var70059a7c[] = {0x00000000};
const u32 var70059a80[] = {0x00000000};
const u32 var70059a84[] = {0x00000000};
const u32 var70059a88[] = {0x00000000};
const u32 var70059a8c[] = {0xbe327e95};
const u32 var70059a90[] = {0xbf0483ed};
const u32 var70059a94[] = {0xbf586174};
const u32 var70059a98[] = {0xbf92d5e9};
const u32 var70059a9c[] = {0xbfb504f7};
const u32 var70059aa0[] = {0xbfd1b3f2};
const u32 var70059aa4[] = {0xbfe803cd};
const u32 var70059aa8[] = {0xbff746ed};
const u32 var70059aac[] = {0xbfff069a};
const u32 var70059ab0[] = {0x3e327e95};
const u32 var70059ab4[] = {0x3f0483ed};
const u32 var70059ab8[] = {0x3f586174};
const u32 var70059abc[] = {0x3f92d5e9};
const u32 var70059ac0[] = {0x3fb504f7};
const u32 var70059ac4[] = {0x3fd1b3f2};
const u32 var70059ac8[] = {0x3fe803cd};
const u32 var70059acc[] = {0x3ff746ed};
const u32 var70059ad0[] = {0x3fff069a};

extern struct mp3decfourbytes *var8009c650[];
extern f32 *var8009c6d8;
extern f32 *var8009c6dc;

bool mp3decInit(void)
{
	s32 i;
	s32 sp268;
	s32 sp264;
	s32 sp260 = 1;
	s32 sp25c;
	u8 *sp258;
	struct mp3decthing *sp254;
	struct mp3decfourbytes *sp250;
	const u8 sp248[] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
	s32 sp244;
	u8 sp243;
	s32 sp23c;
	s32 sp238;
	s32 sp234;
	s32 sp230;
	s32 sp22c;
	s32 sp228;
	s16 sp28[256];
	s32 sp24;

	sp234 = 0;

	for (i = 0; i < 36; i++) {
		sine_block[0][i] = sinf((i + 0.5f) * 0.087266460061073f);
	}

	for (i = 0; i < 18; i++) {
		sine_block[1][i] = sinf((i + 0.5f) * 0.087266460061073f);
	}

	for (i = 18; i < 24; i++) {
		sine_block[1][i] = 1.0f;
	}

	for (i = 24; i < 30; i++) {
		sine_block[1][i] = sinf((i + 0.5f - 18.0f) * 0.26179939508438f);
	}

	for (i = 30; i < 36; i++) {
		sine_block[1][i] = 0.0f;
	}

	for (i = 0; i < 6; i++) {
		sine_block[3][i] = 0.0f;
	}

	for (i = 6; i < 12; i++) {
		sine_block[3][i] = sinf((i + 0.5f - 6.0f) * 0.26179939508438f);
	}

	for (i = 12; i < 18; i++) {
		sine_block[3][i] = 1.0f;
	}

	for (i = 18; i < 36; i++) {
		sine_block[3][i] = sinf((i + 0.5f) * 0.087266460061073f);
	}

	if (var8009c640 == NULL) {
		return false;
	}

	bzero(var8009c640, 10500 * sizeof(struct mp3decfourbytes));

	for (sp264 = 0; sp264 < 34; sp264++) {
		sp254 = var8005f670[sp264];

		if (sp254 == NULL) {
			var8009c650[sp264] = NULL;
			continue;
		}

		var8009c650[sp264] = &var8009c640[sp234];

		sp250 = var8009c650[sp264];

		for (sp268 = 0; sp268 < 10500; sp268++) {
			sp250[sp268].unk02 = -1;
			sp250[sp268].unk03 = -1;
		}

		sp230 = 1;
		sp228 = 1;
		bzero(sp28, sizeof(sp28));
		sp260 = 1;

		while (sp228) {
			sp228 = 0;

			for (sp22c = 0, sp254 = var8005f670[sp264]; sp254->unk00 != 100; sp254++, sp22c++) {
				sp25c = sp28[sp22c];

				if (sp230 <= sp254->unk02) {
					sp258 = &sp250[sp25c].bytes[sp254->unk04 & 1 << (sp230 - 1) ? 1 : 0];

					if (*sp258) {
						sp25c = sp28[sp22c] + *sp258;
					} else {
						*sp258 = sp260 - sp25c;
						sp25c = sp260++;
					}

					if (sp254->unk02 == sp230) {
						sp250[sp25c].unk02 = sp254->unk00;
						sp250[sp25c].unk03 = sp254->unk01;
					} else {
						sp228++;
					}

					sp28[sp22c] = sp25c;
				}
			}

			sp230++;
		}

		sp234 += sp260;

		for (sp254 = var8005f670[sp264]; sp254->unk00 != 100; sp254++) {
			sp244 = sp254->unk02 < 8 ? sp254->unk02 : 8;
			sp243 = 0;

			for (i = 0; i < sp244; i++) {
				if (sp254->unk04 & (1 << i)) {
					sp243 |= sp248[i];
				}
			}

			if (sp254->unk02 >= 9) {
				var8005f6fc[sp264 * 256 + sp243] = 0;
				continue;
			}

			sp23c = 256 >> sp244;
			sp238 = (sp254->unk01 * 16) | sp254->unk00;

			for (i = 0; i < sp23c; i++) {
				sp24 = sp243 | i;
				var8005f6f8[((sp264 * 256) + (sp243 | i))] = sp238;
				var8005f6fc[((sp264 * 256) + (sp243 | i))] = sp244;
			}
		}
	}

	var8009c648 = var8009c644;

	if (var8009c648 == NULL) {
		return false;
	}

	for (i = 0; i < 8192; i++) {
		var8009c648[i] = func00045ed0(i, 1.3333333730698f);
	}

	for (i = 0; i < 256; i++) {
		var8009c6d8[i] = func00045ed0(2.0f, i * -0.5f);
		var8009c6dc[i] = func00045ed0(2.0f, i * -2.0f);
	}

	return true;
}

bool mp3dec00040164(struct asistream *stream, u32 gr, u32 ch)
{
	s32 sp1bc;
	s32 sp1b8;
	s32 sp1b4;
	s32 sp1b0;

	const s32 sp158[] = {
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 0,
	};

	f32 sp100[22];
	f32 sp64[3][13];
	f32 sp60;
	s32 sfb;
	s32 sp58;
	s32 scale;
	s32 sp50;
	s32 sp4c;
	s32 sp48;
	s32 sp44;
	f32 *sp40;
	s16 *sp3c;
	u8 *sp38;
	s32 sp34;
	s32 sp30;
	s32 window_switching;
	s32 sp28;
	f32 *sp24;

	sp1bc = stream->samplerateindex + stream->version * 3;

	if (stream->window_switching[gr][ch] && stream->block_type[gr][ch] == 2) {
		if (stream->mixed_block_flag[gr][ch]) {
			sp1b8 = var700579b8[sp1bc].unk00[1];
		} else {
			sp1b8 = var700579b8[sp1bc].unk2e[1] * 3;
			sp1b0 = var700579b8[sp1bc].unk2e[1];
			sp1b4 = 0;
		}
	} else {
		sp1b8 = var700579b8[sp1bc].unk00[1];
	}

	sp60 = func00045ed0(2, (stream->global_gain[gr][ch] - 210.0f) * 0.25f);
	scale = stream->scalefac_scale[gr][ch];

	for (sfb = 0; sfb < 22; sfb++) {
		sp4c = (stream->scalefac[gr][ch].l[sfb] + stream->preflag[gr][ch] * sp158[sfb]) * (scale + 1);
		sp100[sfb] = var8009c6d8[sp4c] * sp60;
	}

	for (sp58 = 0; sp58 < 3; sp58++) {
		for (sfb = 0; sfb < 13; sfb++) {
			sp50 = stream->subblock_gain[gr][ch][sp58];
			sp4c = stream->scalefac[gr][ch].s[sp58][sfb] * (scale + 1);
			sp64[sp58][sfb] = sp60 * var8009c6dc[sp50] * var8009c6d8[sp4c];
		}
	}

	sfb = 0;
	sp48 = 0;
	sp44 = stream->unk465c[ch];
	sp40 = stream->unk4664[ch][0].unk00;
	sp3c = stream->unk3f94[ch];
	sp38 = stream->unk4418[ch];
	sp34 = stream->block_type[gr][ch] == 2 && stream->mixed_block_flag[gr][ch] == 0;
	sp30 = stream->block_type[gr][ch] == 2 && stream->mixed_block_flag[gr][ch] != 0;
	window_switching = stream->window_switching[gr][ch];

	while (sp48 < sp44) {
		if (sp1b8 > sp44) {
			sp1b8 = sp44;
		}

		if (window_switching) {
			if (sp34 || (sp30 && sp48 >= 36)) {
				sp58 = (sp48 - sp1b4) / sp1b0;
				sp28 = sp1b4 + sp1b0;
			}
		}

		while (sp48 < sp1b8) {
			if (window_switching && (sp34 || (sp30 && sp48 >= 36))) {
				if (sp48 >= sp28) {
					sp28 += sp1b0;
					sp58++;
				}

				sp24 = sp64[sp58];

				if (*sp38++) {
					*sp40++ = -(var8009c648[*sp3c++] * sp24[sfb]);
				} else {
					*sp40++ = var8009c648[*sp3c++] * sp24[sfb];
				}
			} else {
				if (*sp38++) {
					*sp40++ = -(var8009c648[*sp3c++] * sp100[sfb]);
				} else {
					*sp40++ = var8009c648[*sp3c++] * sp100[sfb];
				}
			}

			sp48++;
		}

		if (stream->window_switching[gr][ch] && stream->block_type[gr][ch] == 2) {
			if (stream->mixed_block_flag[gr][ch]) {
				if (var700579b8[sp1bc].unk00[8] == sp48) {
					sp1b8 = var700579b8[sp1bc].unk2e[4] * 3;
					sfb = 3;
					sp1b0 = var700579b8[sp1bc].unk2e[sfb + 1] - var700579b8[sp1bc].unk2e[sfb];
					sp1b4 = var700579b8[sp1bc].unk2e[sfb] * 3;
				} else if (sp48 < var700579b8[sp1bc].unk00[8]) {
					sp1b8 = var700579b8[sp1bc].unk00[++sfb + 1];
				} else {
					sp1b8 = var700579b8[sp1bc].unk2e[++sfb + 1] * 3;
					sp1b0 = var700579b8[sp1bc].unk2e[sfb + 1] - var700579b8[sp1bc].unk2e[sfb];
					sp1b4 = var700579b8[sp1bc].unk2e[sfb] * 3;
				}
			} else {
				sp1b8 = var700579b8[sp1bc].unk2e[++sfb + 1] * 3;
				sp1b0 = var700579b8[sp1bc].unk2e[sfb + 1] - var700579b8[sp1bc].unk2e[sfb];
				sp1b4 = var700579b8[sp1bc].unk2e[sfb] * 3;
			}
		} else {
#ifdef AVOID_UB
			if (sfb > 20) {
				// avoid going out of unk00[] bounds
				sp1b8 = 0;
			} else
#endif
			sp1b8 = var700579b8[sp1bc].unk00[++sfb + 1];
		}
	}

	if (sp48 < 576) {
		bzero(sp40, stream->unk4660[ch] * 4);
		return true;
	}

	return true;
}

bool mp3decUnpackScaleFac(struct asistream *stream, u32 gr, u32 ch)
{
	s32 i;
	s32 sfb;
	s32 window;

	if (stream->window_switching[gr][ch] != 0 && stream->block_type[gr][ch] == 2) {
		if (stream->mixed_block_flag[gr][ch] != 0) {
			for (sfb = 0; sfb < 8; sfb++) {
				stream->scalefac[gr][ch].l[sfb] =
					var70057b7c[0][stream->scalefac_compress[gr][ch]]
					? mp3utilGetBits(stream->unk1c, &stream->unk2020, var70057b7c[0][stream->scalefac_compress[gr][ch]])
					: 0;
			}

			for (sfb = 3; sfb < 6; sfb++) {
				for (window = 0; window < 3; window++) {
					stream->scalefac[gr][ch].s[window][sfb] =
						var70057b7c[0][stream->scalefac_compress[gr][ch]]
						? mp3utilGetBits(stream->unk1c, &stream->unk2020, var70057b7c[0][stream->scalefac_compress[gr][ch]])
						: 0;
				}
			}

			for (sfb = 6; sfb < 12; sfb++) {
				for (window = 0; window < 3; window++) {
					stream->scalefac[gr][ch].s[window][sfb] =
						var70057b7c[1][stream->scalefac_compress[gr][ch]]
						? mp3utilGetBits(stream->unk1c, &stream->unk2020, var70057b7c[1][stream->scalefac_compress[gr][ch]])
						: 0;
				}
			}
		} else {
			for (i = 0; i < 2; i++) {
				for (sfb = var70057b74[5 + i]; sfb < var70057b74[6 + i]; sfb++) {
					for (window = 0; window < 3; window++) {
						stream->scalefac[gr][ch].s[window][sfb] =
							var70057b7c[i][stream->scalefac_compress[gr][ch]]
							? mp3utilGetBits(stream->unk1c, &stream->unk2020, var70057b7c[i][stream->scalefac_compress[gr][ch]])
							: 0;
					}
				}
			}
		}

		for (window = 0; window < 3; window++) {
			stream->scalefac[gr][ch].s[window][12] = 0;
		}
	} else {
		for (i = 0; i < 4; i++) {
			if (stream->scfsi[ch][i] == 0 || gr == 0) {
				for (sfb = var70057b74[i]; sfb < var70057b74[i + 1]; sfb++) {
					stream->scalefac[gr][ch].l[sfb] =
						var70057b7c[i < 2 ? 0 : 1][stream->scalefac_compress[gr][ch]]
						? mp3utilGetBits(stream->unk1c, &stream->unk2020, var70057b7c[i < 2 ? 0 : 1][stream->scalefac_compress[gr][ch]])
						: 0;
				}
			} else {
				for (sfb = var70057b74[i]; sfb < var70057b74[1 + i]; sfb++) {
					stream->scalefac[1][ch].l[sfb] = stream->scalefac[0][ch].l[sfb];
				}
			}
		}

		stream->scalefac[gr][ch].unk3d60 = 0;
	}

	return true;
}

bool mp3dec00041600(struct asistream *stream, u32 gr, u32 ch)
{
	const s32 sp70[2][3][3][4] = {
		{
			{ { 6,  5,  5,  5 }, { 9,  9,  9,  9 }, { 6,  9,  9,  9 } },
			{ { 6,  5,  7,  3 }, { 9,  9,  12, 6 }, { 6,  9,  12, 6 } },
			{ { 11, 10, 0,  0 }, { 18, 18, 0,  0 }, { 15, 18, 0,  0 } },
		}, {
			{ { 7,  7,  7,  0 }, { 12, 12, 12, 0 }, { 6,  15, 12, 0 } },
			{ { 6,  6,  6,  3 }, { 12, 9,  9,  6 }, { 6,  12, 9,  6 } },
			{ { 8,  8,  5,  0 }, { 15, 12, 9,  0 }, { 6,  18, 9,  0 } },
		},
	};

	s32 sp60[4];
	s32 compress;
	u32 *preflag;
	s32 mixed;
	s32 block_type;
	s32 window_switching;
	s32 sp48;
	s32 sp44;
	s32 i;
	s32 j;
	s32 sp38;
	s32 sp28[4];
	s32 sfb;
	s32 sp20;
	s32 sp1c;

	compress = stream->scalefac_compress[0][ch];
	preflag = &stream->preflag[0][ch];
	mixed = stream->mixed_block_flag[0][ch];
	block_type = stream->block_type[0][ch];
	window_switching = stream->window_switching[0][ch];

	if ((stream->unk3bc4 != 1 && stream->unk3bc4 != 3) || ch != 1) {
		sp48 = 0;

		if (compress < 400) {
			sp60[0] = (compress >> 4) / 5;
			sp60[1] = (compress >> 4) % 5;
			sp60[2] = (compress % 16) >> 2;
			sp60[3] = compress % 4;
			*preflag = 0;
			sp44 = 0;
		} else if (compress >= 400 && compress < 500) {
			sp60[0] = ((compress - 400) >> 2) / 5;
			sp60[1] = ((compress - 400) >> 2) % 5;
			sp60[2] = (compress - 400) % 4;
			sp60[3] = 0;
			*preflag = 0;
			sp44 = 1;
		} else if (compress >= 500 && compress < 512) {
			sp60[0] = (compress - 500) / 3;
			sp60[1] = (compress - 500) % 3;
			sp60[2] = 0;
			sp60[3] = 0;
			*preflag = 1;
			sp44 = 2;
		}
	}

	if (stream->unk3bc4 == 1 || stream->unk3bc4 == 3) {
		if (ch == 1) {
			stream->unk3ef8 = compress % 2;
			sp38 = compress >> 1;
			sp48 = 1;

			if (sp38 < 180) {
				sp60[0] = sp38 / 36;
				sp60[1] = (sp38 % 36) / 6;
				sp60[2] = (sp38 % 36) % 6;
				sp60[3] = 0;
				*preflag = 0;
				sp44 = 0;
			} else if (sp38 >= 180 && sp38 < 244) {
				sp60[0] = ((sp38 - 180) % 64) >> 4;
				sp60[1] = ((sp38 - 180) % 16) >> 2;
				sp60[2] = (sp38 - 180) % 4;
				sp60[3] = 0;
				*preflag = 0;
				sp44 = 1;
			} else if (sp38 >= 244 && sp38 < 255) {
				sp60[0] = (sp38 - 244) / 3;
				sp60[1] = (sp38 - 244) % 3;
				sp60[2] = 0;
				sp60[3] = 0;
				*preflag = 0;
				sp44 = 2;
			}
		}
	}

	if (window_switching && block_type == 2) {
		bcopy(sp70[sp48][sp44][mixed + 1], sp28, 0x10);
	} else {
		bcopy(sp70[sp48][sp44][0], sp28, 0x10);
	}

	sfb = 0;

	if (!window_switching || (window_switching && block_type != 2)) {
		for (i = 0; i < 4; i++) {
			sp20 = sp60[i];
			sp1c = (1 << sp20) - 1;

			for (j = 0; j < sp28[i]; j++) {
				stream->scalefac[0][ch].l[sfb] = sp20 ? mp3utilGetBits(stream->unk1c, &stream->unk2020, sp20) : 0;

				if (ch != 0) {
					stream->unk3efc[sfb] = sp1c;
				}

				sfb++;
			}
		}
	} else if (block_type == 2) {
		if (mixed == 0) {
			for (i = 0; i < 4; i++) {
				sp20 = sp60[i];
				sp1c = (1 << sp20) - 1;

				for (j = 0; j < sp28[i]; j += 3) {
					stream->scalefac[0][ch].s[0][sfb] = sp20 ? mp3utilGetBits(stream->unk1c, &stream->unk2020, sp20) : 0;
					stream->scalefac[0][ch].s[1][sfb] = sp20 ? mp3utilGetBits(stream->unk1c, &stream->unk2020, sp20) : 0;
					stream->scalefac[0][ch].s[2][sfb] = sp20 ? mp3utilGetBits(stream->unk1c, &stream->unk2020, sp20) : 0;

					if (ch != 0) {
						stream->unk3f14[sfb] = sp1c;
					}

					sfb++;
				}
			}
		} else {
			sp20 = sp60[0];
			sp1c = (1 << sp20) - 1;

			for (j = 0; j < 6; j++) {
				stream->scalefac[0][ch].l[sfb] = sp20 ? mp3utilGetBits(stream->unk1c, &stream->unk2020, sp20) : 0;

				if (ch != 0) {
					stream->unk3efc[sfb] = sp1c;
				}

				sfb++;
			}

			sp28[0] -= 6;
			sfb = 3;

			for (i = 0; i < 4; i++) {
				sp20 = sp60[i];
				sp1c = (1 << sp20) - 1;

				for (j = 0; j < sp28[i]; j += 3) {
					stream->scalefac[0][ch].s[0][sfb] = sp20 ? mp3utilGetBits(stream->unk1c, &stream->unk2020, sp20) : 0;
					stream->scalefac[0][ch].s[1][sfb] = sp20 ? mp3utilGetBits(stream->unk1c, &stream->unk2020, sp20) : 0;
					stream->scalefac[0][ch].s[2][sfb] = sp20 ? mp3utilGetBits(stream->unk1c, &stream->unk2020, sp20) : 0;

					if (ch != 0) {
						stream->unk3f14[sfb] = sp1c;
					}

					sfb++;
				}
			}
		}
	}

	return true;
}

bool mp3dec00042238(struct asistream *stream, u32 gr, u32 ch)
{
	s32 sp64 = stream->unk2020;
	s32 sp60;
	s32 sp54[3];
	const s16 *sp50;
	const u8 *sp4c;
	s32 sp48;
	s16 *sp44;
	u8 *sp40;
	s32 i;
	u32 sp38;
	s32 sp34;
	s32 sp30;
	s32 sp2c;
	s32 sp28;

	if (stream->version != VERSION_2) {
		mp3decUnpackScaleFac(stream, gr, ch);
	} else {
		mp3dec00041600(stream, gr, ch);
	}

	sp60 = stream->big_value[gr][ch] * 2;
	sp50 = var70057860[stream->version][stream->samplerateindex];
	sp4c = var70057968[stream->version][stream->samplerateindex];

	if (stream->window_switching[gr][ch] == 0 && stream->block_type[gr][ch] == 0) {
		sp54[0] = sp50[stream->region0_count[gr][ch]] + 1;

		if (sp54[0] > sp60) {
			sp54[0] = sp54[1] = sp60;
		} else {
			sp54[1] = sp50[stream->region0_count[gr][ch] + stream->region1_count[gr][ch] + 1] + 1;

			if (sp54[1] > sp60) {
				sp54[1] = sp60;
			}
		}
	} else {
		if (stream->block_type[gr][ch] == 2 && stream->mixed_block_flag[gr][ch] == 0) {
			sp54[0] = sp4c[2] * 3 + 3;
		} else {
			sp54[0] = sp50[7] + 1;
		}

		if (sp54[0] > sp60) {
			sp54[0] = sp60;
		}

		sp54[1] = sp60;
	}

	sp54[2] = sp60;
	sp48 = 0;
	sp44 = stream->unk3f94[ch];
	sp40 = stream->unk4418[ch];

	for (i = 0; i < 3; i++) {
		sp38 = stream->table_select[gr][ch][i];
		sp34 = var700577d8[sp38];
		sp30 = sp54[i];

		if (var8009c650[sp38] == NULL) {
			sp2c = sp30 - sp48;

			bzero(sp44, sp2c * 2);

			sp44 += sp2c;
			sp40 += sp2c;
			sp48 = sp30;
		} else {
			sp48 = mp3util000462f8(stream->unk1c, &stream->unk2020, sp38, sp48, sp34, sp30, &sp44, &sp40);
		}
	}

	sp38 = stream->count1table_select[gr][ch] + 32;
	sp28 = stream->part2_3_length[gr][ch] + sp64;
	sp48 = mp3util000464a8(stream->unk1c, &stream->unk2020, sp38, sp48, sp28, &sp44, &sp40);
	stream->unk2020 = sp28;

	if (sp48 > 576) {
		stream->unk465c[ch] = 576;
	} else {
		stream->unk465c[ch] = sp48;
	}

	if (sp48 < 576) {
		stream->unk4660[ch] = 576 - sp48;
		bzero(sp44, stream->unk4660[ch] * 2);
	} else {
		stream->unk4660[ch] = 0;
	}

	return true;
}

bool mp3dec000427d8(struct asistream *stream, u32 gr)
{
	const s16 *sp14 = var70057b9c[stream->version][stream->samplerateindex];
	f32 *sp10 = stream->unk4f64[0][0].unk00;
	f32 *sp0c = stream->unk4664[0][0].unk00;
	s32 i = 0;

	if (stream->window_switching[gr][0] && stream->block_type[gr][0] == 2) {
		if (stream->mixed_block_flag[gr][0]) {
			while (i++ < 36) {
				*(sp10++) = *(sp0c++);
			}
		}

		while (i < 576) {
			sp10[sp14[i++]] = *(sp0c++);
		}
	} else {
		while (i++ < 576) {
			*(sp10++) = *(sp0c++);
		}
	}

	return true;
}

bool mp3decReduceAliases(struct asistream *stream, u32 gr, u32 ch)
{
	s32 i;

	if (stream->window_switching[gr][ch] && stream->block_type[gr][ch] == 2) {
		return true;
	}

	for (i = 1; i < 32; i++) {
		struct asistream_4f64 *sp08 = &stream->unk4f64[ch][i];
		f32 sp04;
		f32 sp00;

		sp04 = sp08->unk00[0];
		sp00 = sp08->unk00[-1];
		sp08->unk00[-1] = sp00 * var700596bc[0] - var7005969c[0] * sp04;
		sp08->unk00[0] = sp04 * var700596bc[0] + var7005969c[0] * sp00;

		sp04 = sp08->unk00[1];
		sp00 = sp08->unk00[-2];
		sp08->unk00[-2] = sp00 * var700596bc[1] - var7005969c[1] * sp04;
		sp08->unk00[1] = sp04 * var700596bc[1] + var7005969c[1] * sp00;

		sp04 = sp08->unk00[2];
		sp00 = sp08->unk00[-3];
		sp08->unk00[-3] = sp00 * var700596bc[2] - var7005969c[2] * sp04;
		sp08->unk00[2] = sp04 * var700596bc[2] + var7005969c[2] * sp00;

		sp04 = sp08->unk00[3];
		sp00 = sp08->unk00[-4];
		sp08->unk00[-4] = sp00 * var700596bc[3] - var7005969c[3] * sp04;
		sp08->unk00[3] = sp04 * var700596bc[3] + var7005969c[3] * sp00;

		sp04 = sp08->unk00[4];
		sp00 = sp08->unk00[-5];
		sp08->unk00[-5] = sp00 * var700596bc[4] - var7005969c[4] * sp04;
		sp08->unk00[4] = sp04 * var700596bc[4] + var7005969c[4] * sp00;

		sp04 = sp08->unk00[5];
		sp00 = sp08->unk00[-6];
		sp08->unk00[-6] = sp00 * var700596bc[5] - var7005969c[5] * sp04;
		sp08->unk00[5] = sp04 * var700596bc[5] + var7005969c[5] * sp00;

		sp04 = sp08->unk00[6];
		sp00 = sp08->unk00[-7];
		sp08->unk00[-7] = sp00 * var700596bc[6] - var7005969c[6] * sp04;
		sp08->unk00[6] = sp04 * var700596bc[6] + var7005969c[6] * sp00;

		sp04 = sp08->unk00[7];
		sp00 = sp08->unk00[-8];
		sp08->unk00[-8] = sp00 * var700596bc[7] - var7005969c[7] * sp04;
		sp08->unk00[7] = sp04 * var700596bc[7] + var7005969c[7] * sp00;
	}

	return true;
}

bool mp3decSetSideInfo(struct asistream *stream)
{
	s32 sp34;
	s32 ch;
	s32 scfsi_band;
	s32 sp28;
	s32 gr;
	s32 region;
	s32 window;

	if (stream->version != VERSION_2) {
		stream->unk206c = stream->channelmode == CHANNELMODE_SINGLEMONO ? 17 : 32;
	} else {
		stream->unk206c = stream->channelmode == CHANNELMODE_SINGLEMONO ? 9 : 17;
	}

	sp34 = stream->unk04(stream->unk00, &stream->buffer[stream->unk2068], stream->unk206c, -1);

	if (stream->unk206c != sp34) {
		return false;
	}

	stream->unk18 += stream->unk206c;

	stream->numchannels = stream->channelmode == CHANNELMODE_SINGLEMONO ? 1 : 2;
	stream->numgranules = stream->version != VERSION_2 ? 2 : 1;

	if (stream->version != VERSION_2) {
		stream->main_data_begin = mp3utilGetBits(stream->buffer, &stream->count, 9);

		// skip private bits
		stream->numchannels == 1
			? mp3utilGetBits(stream->buffer, &stream->count, 5)
			: mp3utilGetBits(stream->buffer, &stream->count, 3);
	} else {
		stream->main_data_begin = mp3utilGetBits(stream->buffer, &stream->count, 8);

		stream->numchannels == 1
			? mp3utilGetBits(stream->buffer, &stream->count, 1)
			: mp3utilGetBits(stream->buffer, &stream->count, 2);
	}

	if (stream->version != VERSION_2) {
		for (ch = 0; ch < stream->numchannels; ch++) {
			for (scfsi_band = 0; scfsi_band < 4; scfsi_band++) {
				stream->scfsi[ch][scfsi_band] = mp3utilGetBits(stream->buffer, &stream->count, 1);
			}
		}
	}

	if (stream->version != VERSION_2) {
		sp28 = 4;
	} else {
		sp28 = 9;
	}

	for (gr = 0; gr < stream->numgranules; gr++) {
		for (ch = 0; ch < stream->numchannels; ch++) {
			stream->part2_3_length[gr][ch] = mp3utilGetBits(stream->buffer, &stream->count, 12);
			stream->big_value[gr][ch] = mp3utilGetBits(stream->buffer, &stream->count, 9);
			stream->global_gain[gr][ch] = mp3utilGetBits(stream->buffer, &stream->count, 8);
			stream->scalefac_compress[gr][ch] = sp28 ? mp3utilGetBits(stream->buffer, &stream->count, sp28) : 0;
			stream->window_switching[gr][ch] = mp3utilGetBits(stream->buffer, &stream->count, 1);

			if (stream->window_switching[gr][ch]) {
				stream->block_type[gr][ch] = mp3utilGetBits(stream->buffer, &stream->count, 2);
				stream->mixed_block_flag[gr][ch] = mp3utilGetBits(stream->buffer, &stream->count, 1);

				for (region = 0; region < 2; region++) {
					stream->table_select[gr][ch][region] = mp3utilGetBits(stream->buffer, &stream->count, 5);
				}

				stream->table_select[gr][ch][2] = 0;

				for (window = 0; window < 3; window++) {
					stream->subblock_gain[gr][ch][window] = mp3utilGetBits(stream->buffer, &stream->count, 3);
				}
			} else {
				stream->block_type[gr][ch] = 0;
				stream->mixed_block_flag[gr][ch] = false;

				for (region = 0; region < 3; region++) {
					stream->table_select[gr][ch][region] = mp3utilGetBits(stream->buffer, &stream->count, 5);
				}

				stream->region0_count[gr][ch] = mp3utilGetBits(stream->buffer, &stream->count, 4);
				stream->region1_count[gr][ch] = mp3utilGetBits(stream->buffer, &stream->count, 3);
			}

			if (stream->version != VERSION_2) {
				stream->preflag[gr][ch] = mp3utilGetBits(stream->buffer, &stream->count, 1);
			}

			stream->scalefac_scale[gr][ch] = mp3utilGetBits(stream->buffer, &stream->count, 1);
			stream->count1table_select[gr][ch] = mp3utilGetBits(stream->buffer, &stream->count, 1);
		}
	}

	stream->unk3f7c = var700596dc[stream->version][stream->bitrateindex];
	stream->unk3f80 = var70059754[stream->version][stream->samplerateindex];

	if (stream->version != VERSION_2) {
		stream->unk3f84 = stream->unk3f7c * 144 / stream->unk3f80;
	} else {
		stream->unk3f84 = stream->unk3f7c * 72 / stream->unk3f80;
	}

	stream->unk3f88 = (stream->unk3f84 + stream->haspadding) - (stream->unk2068 + stream->unk206c);

	return true;
}

bool mp3decDecodeFrame(struct asistream *stream)
{
	s32 sp954;
	s32 gr = 0;
	s32 ch;
	s32 sp948;
	s32 sp944;
	s32 sp940;
	s32 i;
	s32 j;
	u16 *sp934;
	struct asistream_4f64 sp34[32];
	f32 sp30;
	f32 sp2c;
	f32 sp28;
	s32 sp24;
	s32 sp20;

	sp934 = stream->unk2070[stream->unk3ba0].unk00;
	sp954 = mp3main00043dd0(stream);

	if (sp954 == -1) {
		return false;
	}

	stream->unk2020 = (sp954 - stream->main_data_begin) * 8;

	if (stream->unk2020 < 0) {
		return true;
	}

	for (ch = 0; ch < stream->numchannels; ch++) {
		mp3dec00042238(stream, gr, ch);
		mp3dec00040164(stream, gr, ch);
	}

	mp3dec000427d8(stream, gr);

	if (stream->window_switching[gr][0] != 0 && stream->block_type[gr][0] == 2) {
		sp948 = 32;
	} else {
		sp944 = (stream->unk465c[0] - 1) / 18 + 1;
		sp948 = sp944;
	}

	for (ch = 0; ch < stream->numchannels; ch++) {
		mp3decReduceAliases(stream, gr, ch);

		if (stream->window_switching[gr][ch] != 0
				&& stream->block_type[gr][ch] == 2
				&& stream->mixed_block_flag[gr][ch] != 0) {
			sp940 = 0;
		} else if (stream->window_switching[gr][ch] == 0) {
			sp940 = 0;
		} else {
			sp940 = stream->block_type[gr][ch];
		}

		if (sp940 == 2) {
			for (i = 0; i < 2; i++) {
				func00047550(&stream->unk4f64[ch][i], i, &sp34[i], &stream->unk6a64[ch][i]);
			}
		} else {
			for (i = 0; i < 2; i++) {
				func00046650(&stream->unk4f64[ch][i], i, &sp34[i], &stream->unk6a64[ch][i], sine_block[sp940]);
			}
		}

		if (stream->window_switching[gr][ch]
					&& stream->block_type[gr][ch] == 2
					&& stream->mixed_block_flag[gr][ch]) {
			sp940 = 2;
		}

		if (sp940 == 2) {
			for (i = 2; i < sp948; i++) {
				func00047550(&stream->unk4f64[ch][i], i, &sp34[i], &stream->unk6a64[ch][i]);
			}
		} else {
			for (i = 2; i < sp948; i++) {
				func00046650(&stream->unk4f64[ch][i], i, &sp34[i], &stream->unk6a64[ch][i], sine_block[sp940]);
			}
		}

		while (i < 32) {
			bcopy(&stream->unk6a64[ch][i], &sp34[i], sizeof(struct asistream_4f64));
			bzero(&stream->unk6a64[ch][i], sizeof(struct asistream_4f64));
			i++;
		}

		sp30 = 65536;
		sp28 = 1;
		sp20 = sp30 * sp28 * 16;
		*sp934 = sp20 >> 16;
		sp934++;

		*sp934 = sp20 & 0xffff;
		sp934++;

		sp20 = -sp20;
		*sp934 = sp20 >> 16;
		sp934++;

		*sp934 = sp20 & 0xffff;
		sp934++;

		sp2c = 2048 / sp28;

		for (j = 0; j < 18; j++) {
			for (i = 0; i < 32; i++) {
				sp24 = sp34[i].unk00[j] * sp2c;
				*sp934 = sp24;
				sp934++;
			}
		}
	}

	return true;
}
